From a940dbab0130ca210bcd29418af1d4ebea85e97b Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sun, 3 May 2020 10:34:25 +0200 Subject: [PATCH] Fixed replay gain issue --- deemix/app/downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deemix/app/downloader.py b/deemix/app/downloader.py index d177006..eaafea0 100644 --- a/deemix/app/downloader.py +++ b/deemix/app/downloader.py @@ -300,7 +300,7 @@ def getTrackData(dz, trackAPI_gw, trackAPI=None, albumAPI_gw=None, albumAPI=None if not trackAPI: trackAPI = dz.get_track(track['id']) track['bpm'] = trackAPI['bpm'] - if not 'replayGain' in track: + if not 'replayGain' in track or not track['replayGain']: track['replayGain'] = "{0:.2f} dB".format((float(trackAPI['gain']) + 18.4) * -1) if 'gain' in trackAPI else "" if not 'explicit' in track: track['explicit'] = trackAPI['explicit_lyrics']