Always send queue & event
This commit is contained in:
parent
72ceb0f8dc
commit
a6a7eeb690
1 changed files with 6 additions and 5 deletions
|
@ -110,14 +110,15 @@ def queue_next():
|
|||
|
||||
if room.playing_idx >= len(room.playing):
|
||||
## queue ended
|
||||
|
||||
room.renew_queue()
|
||||
data = {"success": True, "ended": True, "index": room.playing_idx, "queue": [asdict(s) for s in room.playing]}
|
||||
state.socketio.emit("new_queue", data, to=str(room.id))
|
||||
ended = True
|
||||
else:
|
||||
ended = False
|
||||
|
||||
return data
|
||||
data = {"success": True, "ended": ended, "index": room.playing_idx, "queue": [asdict(s) for s in room.playing]}
|
||||
state.socketio.emit("queue_update", data, to=str(room.id))
|
||||
|
||||
return {"success": True, "ended": False, "index": room.playing_idx}
|
||||
return data
|
||||
|
||||
|
||||
@app.post("/api/room/new")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue