Fixed replay gain issue
This commit is contained in:
parent
9ac168ab9c
commit
a940dbab01
|
@ -300,7 +300,7 @@ def getTrackData(dz, trackAPI_gw, trackAPI=None, albumAPI_gw=None, albumAPI=None
|
||||||
if not trackAPI:
|
if not trackAPI:
|
||||||
trackAPI = dz.get_track(track['id'])
|
trackAPI = dz.get_track(track['id'])
|
||||||
track['bpm'] = trackAPI['bpm']
|
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 ""
|
track['replayGain'] = "{0:.2f} dB".format((float(trackAPI['gain']) + 18.4) * -1) if 'gain' in trackAPI else ""
|
||||||
if not 'explicit' in track:
|
if not 'explicit' in track:
|
||||||
track['explicit'] = trackAPI['explicit_lyrics']
|
track['explicit'] = trackAPI['explicit_lyrics']
|
||||||
|
|
Loading…
Reference in New Issue