Added file content check when saving flac covers

This commit is contained in:
RemixDev 2021-06-17 20:12:25 +02:00
parent 93ec8cd967
commit d2f493fce2

View file

@ -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()