mirror of
https://gitlab.com/RemixDev/deemix-gui-pyweb.git
synced 2024-12-29 10:56:06 +00:00
Fixed tab back function and added disc number
This commit is contained in:
parent
1d031d9e51
commit
b48cde6c7d
10
server.py
10
server.py
|
@ -139,6 +139,16 @@ def getTracklist(data):
|
|||
else:
|
||||
releaseAPI = getattr(session['dz'], 'get_'+data['type'])(data['id'])
|
||||
releaseTracksAPI = getattr(session['dz'], 'get_'+data['type']+'_tracks')(data['id'])['data']
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue