From ba492a329be38a93a4cbece6d739b5f4d75e3e19 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 6 Jan 2022 14:39:20 +0100 Subject: [PATCH] Fixed file not found issue in CreateSearchedLog on singles --- deemix/downloader.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deemix/downloader.js b/deemix/downloader.js index ee58636..5e9f096 100644 --- a/deemix/downloader.js +++ b/deemix/downloader.js @@ -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"