database: updates
Local Docker Build (Dev) / build-dev (push) Successful in 5s

This commit is contained in:
2025-11-03 11:11:00 -05:00
parent 2feac00b4c
commit e397f0639b
2 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
2.8.3-populate-fix3
2.8.4-populate-fix4
+9 -3
View File
@@ -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'")