diff --git a/deemix/tagger.js b/deemix/tagger.js index 81720a9..2ecbf7a 100644 --- a/deemix/tagger.js +++ b/deemix/tagger.js @@ -114,12 +114,14 @@ function tagID3(path, track, save){ if (save.cover && track.album.embeddedCoverPath){ const coverArrayBuffer = fs.readFileSync(track.album.embeddedCoverPath) - tag.setFrame('APIC', { - type: 3, - data: coverArrayBuffer, - description: 'cover', - useUnicodeEncoding: save.coverDescriptionUTF8 - }) + if (coverArrayBuffer.length != 0){ + tag.setFrame('APIC', { + type: 3, + data: coverArrayBuffer, + description: 'cover', + useUnicodeEncoding: save.coverDescriptionUTF8 + }) + } } tag.addTag()