From ce98393683b6dba92557d6b2857f6fb8b55e43ef Mon Sep 17 00:00:00 2001 From: RemixDev Date: Thu, 30 Sep 2021 19:40:46 +0200 Subject: [PATCH] Don't save BPM to tags if not found --- deemix/tagger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deemix/tagger.py b/deemix/tagger.py index 5ea0d32..f19efc0 100644 --- a/deemix/tagger.py +++ b/deemix/tagger.py @@ -58,7 +58,7 @@ def tagID3(path, track, save): tag.add(TDAT(text=str(track.date.day) + str(track.date.month))) if save['length']: tag.add(TLEN(text=str(int(track.duration)*1000))) - if save['bpm']: + if save['bpm'] and track.bpm: tag.add(TBPM(text=str(track.bpm))) if save['label']: tag.add(TPUB(text=track.album.label)) @@ -177,7 +177,7 @@ def tagFLAC(path, track, save): if save['length']: tag["LENGTH"] = str(int(track.duration)*1000) - if save['bpm']: + if save['bpm'] and track.bpm: tag["BPM"] = str(track.bpm) if save['label']: tag["PUBLISHER"] = track.album.label