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'")