From d2f493fce2c5dcebea58d509cd46e52a99a26bed Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 17 Jun 2021 20:12:25 +0200 Subject: [PATCH] Added file content check when saving flac covers --- deemix/tagger.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deemix/tagger.js b/deemix/tagger.js index e6000ad..cb870de 100644 --- a/deemix/tagger.js +++ b/deemix/tagger.js @@ -211,7 +211,8 @@ function tagFLAC(path, track, save){ } if (save.cover && track.album.embeddedCoverPath){ - flac.importPicture(track.album.embeddedCoverPath) + let picture = fs.readFileSync(track.album.embeddedCoverPath) + if (picture.length != 0) flac.importPicture(picture) } flac.save()