mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2024-12-28 18:36:26 +00:00
Don't save empty covers in mp3
This commit is contained in:
parent
27d44c172c
commit
638c621a4a
|
@ -114,12 +114,14 @@ function tagID3(path, track, save){
|
||||||
|
|
||||||
if (save.cover && track.album.embeddedCoverPath){
|
if (save.cover && track.album.embeddedCoverPath){
|
||||||
const coverArrayBuffer = fs.readFileSync(track.album.embeddedCoverPath)
|
const coverArrayBuffer = fs.readFileSync(track.album.embeddedCoverPath)
|
||||||
tag.setFrame('APIC', {
|
if (coverArrayBuffer.length != 0){
|
||||||
type: 3,
|
tag.setFrame('APIC', {
|
||||||
data: coverArrayBuffer,
|
type: 3,
|
||||||
description: 'cover',
|
data: coverArrayBuffer,
|
||||||
useUnicodeEncoding: save.coverDescriptionUTF8
|
description: 'cover',
|
||||||
})
|
useUnicodeEncoding: save.coverDescriptionUTF8
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tag.addTag()
|
tag.addTag()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue