From 2341942928a38647d78591aed12e53f20b7f67c9 Mon Sep 17 00:00:00 2001 From: Sleeps Date: Tue, 6 Oct 2026 18:29:16 +0100 Subject: [PATCH] Serve the web dashboard from the API --- scene_search/api.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scene_search/api.py b/scene_search/api.py index 7119826..06659bf 100644 --- a/scene_search/api.py +++ b/scene_search/api.py @@ -12,6 +12,8 @@ from .database import connect, init_db from .index_jobs import IndexJobManager from .search_service import SearchService +WEB_INDEX_PATH = Path(__file__).parent / "web" / "index.html" + app = FastAPI( title="Jellyfin Scene Search API", version="1.0.0", @@ -64,6 +66,11 @@ def require_api_key( raise HTTPException(status_code=401, detail="Invalid API key") +@app.get("/", include_in_schema=False) +def web_dashboard() -> FileResponse: + return FileResponse(WEB_INDEX_PATH, media_type="text/html") + + @app.get("/api/health") def health() -> dict: return get_search_service().health()