Serve the web dashboard from the API

This commit is contained in:
Sleeps
2026-10-06 18:29:16 +01:00
parent a87d480092
commit 2341942928
+7
View File
@@ -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()