mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-10 08:02:26 +01:00
Volume control from the web interface.
This commit is contained in:
@ -15,9 +15,15 @@ from .decorators import token_required
|
||||
def queue(request):
|
||||
queue = get_object_or_404(Queue, id=request.POST.get('queue'))
|
||||
|
||||
commands = queue.queuecommand_set.filter(executed=False)
|
||||
for command in commands:
|
||||
command.executed = True
|
||||
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]]
|
||||
'queue': [playlist_song_to_dict(playlist_song, True) for playlist_song in queue.queue()[:1]],
|
||||
'commands': [command.command for command in commands]
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user