Refactor {,playlist_}song_to_dict

This commit is contained in:
Daan Sprenkels
2018-08-16 22:09:58 +02:00
parent 7b8d012924
commit 641e5cb908
2 changed files with 13 additions and 8 deletions

View File

@ -22,8 +22,8 @@ def queue(request):
command.save()
return JsonResponse({
'current_song': playlist_song_to_dict(queue.current_song(), True),
'queue': [playlist_song_to_dict(playlist_song, True) for playlist_song in queue.queue()[:1]],
'current_song': playlist_song_to_dict(queue.current_song(), hash=True, replaygain=True),
'queue': [playlist_song_to_dict(playlist_song, hash=True, replaygain=True) for playlist_song in queue.queue()[:1]],
'commands': [command.command for command in commands]
})