You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-26 21:53:54 +01:00
uh huh
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
ws.addEventListener("open", () => {
|
||||
document.getElementById("server-status").textContent = "connected";
|
||||
reconnectDelay = 1000;
|
||||
ws.send(JSON.stringify({action:"request_state"}));
|
||||
// ws.send(JSON.stringify({action:"request_state"}));
|
||||
// also request a top-play list if you want:
|
||||
// ws.send(JSON.stringify({action:"get_toplay"}));
|
||||
});
|
||||
|
||||
@@ -68,8 +68,6 @@ async def ws_handler(websocket: ServerConnection, shared_data: dict, imc_q: mult
|
||||
}
|
||||
except Exception: payload = {}
|
||||
await websocket.send(json.dumps({"event": "state", "data": payload}))
|
||||
elif action == "request_dirs":
|
||||
await websocket.send(json.dumps({"event": "dirs", "files": [i.name for i in list(MAIN_PATH_DIR.iterdir()) if i.is_file()], "dirs": [i.name for i in list(MAIN_PATH_DIR.iterdir()) if i.is_dir()], "base": str(MAIN_PATH_DIR)}))
|
||||
else:
|
||||
await websocket.send(json.dumps({"error": "unknown action"}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user