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