mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-07-29 15:29:14 +02:00
web dir
This commit is contained in:
+2
-2
@@ -134,7 +134,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws
|
|||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
if request.path == "/" and (file := Path(__file__, "..", "index.html").resolve()).exists():
|
if request.path == "/" and (file := Path(__file__, "..", "web", "index.html").resolve()).exists():
|
||||||
data = file.read_bytes()
|
data = file.read_bytes()
|
||||||
return Response(
|
return Response(
|
||||||
200,
|
200,
|
||||||
@@ -142,7 +142,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws
|
|||||||
Headers([("Content-Type", "text/html; charset=utf-8"), ("Content-Length", f"{len(data)}")]),
|
Headers([("Content-Type", "text/html; charset=utf-8"), ("Content-Length", f"{len(data)}")]),
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
elif (file := Path(__file__, "..", request.path.removeprefix("/").strip()).resolve()).exists():
|
elif (file := Path(__file__, "..", "web", request.path.removeprefix("/").strip()).resolve()).exists():
|
||||||
data = file.read_bytes()
|
data = file.read_bytes()
|
||||||
return Response(
|
return Response(
|
||||||
200,
|
200,
|
||||||
|
|||||||
Reference in New Issue
Block a user