0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 13:52:00 +01:00

skip next

This commit is contained in:
2025-12-14 11:37:37 +01:00
parent 2b5e6d7c03
commit 101beed96a
3 changed files with 32 additions and 3 deletions

View File

@@ -61,6 +61,10 @@ async def ws_handler(websocket: ServerConnection, shared_data: dict, imc_q: mult
result = await get_imc("activemod", {"action": "clear_toplay"})
if result is None: await websocket.send(json.dumps({"error": "timeout", "code": 504}))
else: await websocket.send(json.dumps({"data": result, "event": "toplay"})) # Yes, this is not an accident
elif action == "skip_next":
result = await get_imc("activemod", {"action": "skip_next", "set": msg.get("set",True)})
if result is None: await websocket.send(json.dumps({"error": "timeout", "code": 504}))
else: await websocket.send(json.dumps({"data": result, "event": "skip_next"}))
elif action == "request_state":
# supports requesting specific parts if provided
what = msg.get("what", "")