Fixed cursed album

This commit is contained in:
RemixDev 2020-04-21 16:14:37 +02:00
parent ff0fe2c546
commit 122bc3f818

View file

@ -141,7 +141,7 @@ def getTracklist(data):
releaseTracksAPI = getattr(session['dz'], 'get_'+data['type']+'_tracks')(data['id'])['data'] releaseTracksAPI = getattr(session['dz'], 'get_'+data['type']+'_tracks')(data['id'])['data']
tracks = [] tracks = []
showdiscs = False showdiscs = False
if data['type'] == 'album' and releaseTracksAPI[-1]['disk_number'] != 1: if data['type'] == 'album' and len(releaseTracksAPI) and releaseTracksAPI[-1]['disk_number'] != 1:
current_disk = 0 current_disk = 0
showdiscs = True showdiscs = True
for track in releaseTracksAPI: for track in releaseTracksAPI: