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

clear to play

This commit is contained in:
2025-12-14 11:16:01 +01:00
parent a9e5bb24f0
commit 9c61fcfa38
3 changed files with 21 additions and 5 deletions

View File

@@ -57,6 +57,10 @@ async def ws_handler(websocket: ServerConnection, shared_data: dict, imc_q: mult
result = await get_imc("activemod", {"action": "get_toplay"})
if result is None: await websocket.send(json.dumps({"error": "timeout", "code": 504}))
else: await websocket.send(json.dumps({"data": result, "event": "toplay"}))
elif action == "clear_toplay":
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 == "request_state":
# supports requesting specific parts if provided
what = msg.get("what", "")