From db53517784116c9fe401dc755e543cbf9c0c26c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B6=B5=E6=9B=A6?= Date: Mon, 15 Jul 2024 17:22:24 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20#126=20=E4=BF=AE=E5=A4=8Dpip=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E4=B8=BB=E9=A1=B5=E6=89=93=E4=B8=8D=E5=BC=80?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaomusic/httpserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xiaomusic/httpserver.py b/xiaomusic/httpserver.py index cc9ccd3..45d4854 100644 --- a/xiaomusic/httpserver.py +++ b/xiaomusic/httpserver.py @@ -92,7 +92,8 @@ def HttpInit(_xiaomusic): @app.get("/") async def read_index(): - return FileResponse("xiaomusic/static/index.html") + folder = os.path.dirname(__file__) + return FileResponse(f"{folder}/static/index.html") @app.get("/getversion")