mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-28 18:36:07 +00:00
Fixed tab back function and added disc number
This commit is contained in:
parent
1d031d9e51
commit
b48cde6c7d
12
server.py
12
server.py
|
@ -139,7 +139,17 @@ def getTracklist(data):
|
|||
else:
|
||||
releaseAPI = getattr(session['dz'], 'get_'+data['type'])(data['id'])
|
||||
releaseTracksAPI = getattr(session['dz'], 'get_'+data['type']+'_tracks')(data['id'])['data']
|
||||
releaseAPI['tracks'] = releaseTracksAPI
|
||||
if data['type'] == 'album' and releaseTracksAPI[-1]['disk_number'] != 1:
|
||||
tracks = []
|
||||
current_disk = 0
|
||||
for release in releaseTracksAPI:
|
||||
if int(release['disk_number']) != current_disk:
|
||||
current_disk = int(release['disk_number'])
|
||||
tracks.append({'type': 'disc_separator', 'number': current_disk})
|
||||
tracks.append(release)
|
||||
releaseAPI['tracks'] = tracks
|
||||
else:
|
||||
releaseAPI['tracks'] = releaseTracksAPI
|
||||
emit('show_'+data['type'], releaseAPI)
|
||||
|
||||
def run_server(port):
|
||||
|
|
Loading…
Reference in a new issue