diff --git a/modules/web.html b/modules/web.html index 25a96a0..fdc3a1f 100644 --- a/modules/web.html +++ b/modules/web.html @@ -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"})); }); diff --git a/modules/web.py b/modules/web.py index acc9144..596e7dc 100644 --- a/modules/web.py +++ b/modules/web.py @@ -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"}))