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