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){
|
||||
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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue