From c91c33e9b22bbf3084e45a7b6e983ee0f0e2d08c Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Mon, 3 Nov 2025 10:54:06 -0500 Subject: [PATCH] udpate: web populate fix --- VERSION | 2 +- nfoguard-web/api/web_routes.py | 11 ++++++++++- nfoguard-web/main_web.py | 2 +- nfoguard-web/static/index.html | 6 +++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 834f262..3d3fc73 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.0 +2.8.1-populate-fix diff --git a/nfoguard-web/api/web_routes.py b/nfoguard-web/api/web_routes.py index 4b41b20..d0954c9 100644 --- a/nfoguard-web/api/web_routes.py +++ b/nfoguard-web/api/web_routes.py @@ -1258,9 +1258,12 @@ def register_web_routes(app, dependencies): return {"status": "logged_out", "message": "Session cleared"} # Database population endpoints + print("🔧 DEBUG: Registering /admin/populate-database endpoint...") + @app.post("/admin/populate-database") async def api_populate_database(request: Request, background_tasks: BackgroundTasks): """Populate database from Radarr/Sonarr""" + print(f"🔥 DEBUG: populate-database endpoint called!") try: data = await request.json() media_type = data.get("media_type", "both") @@ -1269,6 +1272,8 @@ def register_web_routes(app, dependencies): media_type = request.query_params.get("media_type", "both") return await populate_database(background_tasks, media_type, dependencies) + print("✅ DEBUG: /admin/populate-database registered") + @app.get("/api/populate/status") async def api_populate_status(): """Get database population status""" @@ -1280,4 +1285,8 @@ def register_web_routes(app, dependencies): """Health check endpoint for container monitoring""" return {"status": "healthy", "service": "nfoguard-web"} - print("✅ Web routes registered successfully") \ No newline at end of file + print("✅ Web routes registered successfully") + print(f"📋 DEBUG: Registered routes count: {len(app.routes)}") + for route in app.routes: + if hasattr(route, 'path') and hasattr(route, 'methods'): + print(f" - {route.methods} {route.path}") \ No newline at end of file diff --git a/nfoguard-web/main_web.py b/nfoguard-web/main_web.py index 07a88e6..820c811 100644 --- a/nfoguard-web/main_web.py +++ b/nfoguard-web/main_web.py @@ -33,7 +33,7 @@ def create_web_app() -> FastAPI: app = FastAPI( title="NFOGuard Web Interface", description="Web interface for NFOGuard media database management", - version="2.6.12-web", + version="2.8.1-populate-fix", docs_url="/docs" if web_config.web_debug else None, redoc_url="/redoc" if web_config.web_debug else None ) diff --git a/nfoguard-web/static/index.html b/nfoguard-web/static/index.html index d67590e..ed9654f 100644 --- a/nfoguard-web/static/index.html +++ b/nfoguard-web/static/index.html @@ -4,7 +4,7 @@ NFOGuard - Database Management - + @@ -12,7 +12,7 @@
-

NFOGuard

+

NFOGuard v2.8.1-populate-fix

Database Management & Reporting