mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-14 22:11:27 +00:00
Serve the web dashboard from the API
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user