From e397f0639b43247aed97ca21bff7ed7ee762d66e Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Mon, 3 Nov 2025 11:11:00 -0500 Subject: [PATCH] database: updates --- VERSION | 2 +- api/web_routes.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index a7fb358..619f92e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.8.3-populate-fix3 +2.8.4-populate-fix4 diff --git a/api/web_routes.py b/api/web_routes.py index 63c1945..10f9457 100644 --- a/api/web_routes.py +++ b/api/web_routes.py @@ -1259,16 +1259,22 @@ async def populate_database(background_tasks: BackgroundTasks, media_type: str = Status message indicating population has started """ from core.database_populator import DatabasePopulator + import os db = dependencies["db"] - config = dependencies["config"] # Get Radarr and Sonarr clients from clients.radarr_client import RadarrClient from clients.sonarr_client import SonarrClient - radarr_client = RadarrClient(config) - sonarr_client = SonarrClient(config) + radarr_client = RadarrClient( + os.environ.get("RADARR_URL", ""), + os.environ.get("RADARR_API_KEY", "") + ) + sonarr_client = SonarrClient( + os.environ.get("SONARR_URL", ""), + os.environ.get("SONARR_API_KEY", "") + ) if media_type not in ["both", "movies", "tv"]: raise HTTPException(status_code=400, detail="media_type must be 'both', 'movies', or 'tv'")