mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2024-12-28 02:16:08 +00:00
Fixed file not found issue in CreateSearchedLog on singles
This commit is contained in:
parent
a82b674cb3
commit
ba492a329b
|
@ -665,7 +665,10 @@ class Downloader {
|
|||
try {
|
||||
if (this.settings.logSearched && track.searched){
|
||||
let filename = `${track.data.artist} - ${track.data.title}`
|
||||
let searchedFile = fs.readFileSync(`${this.downloadObject.extrasPath}/searched.txt`).toString()
|
||||
let searchedFile
|
||||
try {
|
||||
searchedFile = fs.readFileSync(`${this.downloadObject.extrasPath}/searched.txt`).toString()
|
||||
} catch { searchedFile = "" }
|
||||
if (searchedFile.indexOf(filename) == -1){
|
||||
if (searchedFile != "") searchedFile += "\r\n"
|
||||
searchedFile += filename + "\r\n"
|
||||
|
|
Loading…
Reference in a new issue