From 8d2a179118841b6c7abcfd2f063f1a4372bd9b5a Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 30 Sep 2021 19:40:54 +0200 Subject: [PATCH] Don't save BPM to tags if not found --- deemix/tagger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/tagger.js b/deemix/tagger.js index 0f9a8e6..60021d9 100644 --- a/deemix/tagger.js +++ b/deemix/tagger.js @@ -57,7 +57,7 @@ function tagID3(path, track, save){ if (save.date) tag.setFrame('TDAT', "" + track.date.day + track.date.month) if (save.length) tag.setFrame('TLEN', parseInt(track.duration)*1000) - if (save.bpm) tag.setFrame('TBPM', track.bpm) + if (save.bpm && track.bpm) tag.setFrame('TBPM', track.bpm) if (save.label) tag.setFrame('TPUB', track.album.label) if (save.isrc) tag.setFrame('TSRC', track.ISRC) if (save.barcode) tag.setFrame('TXXX', { @@ -196,7 +196,7 @@ function tagFLAC(path, track, save){ else if (save.year) flac.setTag(`DATE=${track.date.year}`) if (save.length) flac.setTag(`LENGTH=${parseInt(track.duration)*1000}`) - if (save.bpm) flac.setTag(`BPM=${track.bpm}`) + if (save.bpm && track.bpm) flac.setTag(`BPM=${track.bpm}`) if (save.label) flac.setTag(`PUBLISHER=${track.album.label}`) if (save.isrc) flac.setTag(`ISRC=${track.ISRC}`) if (save.barcode) flac.setTag(`BARCODE=${track.album.barcode}`)