mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 17:42:21 +01:00
Fix bug introduced by 19c1c70
This commit is contained in:
@ -170,7 +170,7 @@ def queue(request):
|
||||
queue = request.user.queue
|
||||
return JsonResponse({
|
||||
'current_song': playlist_song_to_dict(queue.current_song()),
|
||||
'queue': [playlist_song_to_dict(playlist_song, include_user=request.user) for playlist_song in queue.queue()],
|
||||
'queue': [playlist_song_to_dict(playlist_song, user=request.user) for playlist_song in queue.queue()],
|
||||
'started_at': 0 if queue.started_at is None else int(queue.started_at.timestamp()),
|
||||
'current_time': int(time.time())
|
||||
})
|
||||
|
||||
@ -7,7 +7,7 @@ from django.http import StreamingHttpResponse
|
||||
|
||||
from queues.models import Queue, Playlist
|
||||
|
||||
def song_to_dict(song, include_hash=False, include_user=False, include_replaygain=False):
|
||||
def song_to_dict(song, include_hash=False, include_user=False, include_replaygain=False, **options):
|
||||
data = {
|
||||
'id': song.id,
|
||||
'artist': song.artist,
|
||||
|
||||
Reference in New Issue
Block a user