From 122bc3f8189a4d691678849041532f928a653fe7 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 21 Apr 2020 16:14:37 +0200 Subject: [PATCH] Fixed cursed album --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index f7bb1c1..6f05e0e 100644 --- a/server.py +++ b/server.py @@ -141,7 +141,7 @@ def getTracklist(data): releaseTracksAPI = getattr(session['dz'], 'get_'+data['type']+'_tracks')(data['id'])['data'] tracks = [] 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 showdiscs = True for track in releaseTracksAPI: