From 4b77872fd5b68b9b77d772be839b646ceec77b7b Mon Sep 17 00:00:00 2001 From: sbcrumb Date: Wed, 15 Oct 2025 16:02:51 -0400 Subject: [PATCH] web: more web updated and improvements --- VERSION | 2 +- api/web_routes.py | 6 +++--- clients/sonarr_client.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index a6333e4..0b6e431 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.9 +2.2.11 diff --git a/api/web_routes.py b/api/web_routes.py index 6c4c62f..3c8e659 100644 --- a/api/web_routes.py +++ b/api/web_routes.py @@ -980,8 +980,8 @@ async def get_episode_date_options(dependencies: dict, imdb_id: str, season: int episodes = external_clients.tmdb.get_tv_season_episodes(tmdb_id, season) print(f"🔍 DEBUG: TMDB episodes found: {episodes}") - if episode in episodes: - air_date = episodes[episode] + if int(episode) in episodes: + air_date = episodes[int(episode)] print(f"🔍 DEBUG: TMDB air date for S{season:02d}E{episode:02d}: {air_date}") if air_date: @@ -1008,7 +1008,7 @@ async def get_episode_date_options(dependencies: dict, imdb_id: str, season: int }) print(f"✅ Added 'Use Air Date' option from TMDB: {air_date}") else: - print(f"❌ Episode {episode} not found in TMDB season {season} data") + print(f"❌ Episode {int(episode)} not found in TMDB season {season} data") else: print(f"❌ No TV series ID found in TMDB for {imdb_id}") except Exception as e: diff --git a/clients/sonarr_client.py b/clients/sonarr_client.py index 48c754e..0985662 100644 --- a/clients/sonarr_client.py +++ b/clients/sonarr_client.py @@ -248,7 +248,7 @@ class SonarrClient: _log("WARNING", f"No import events, using grab date: {earliest_grab['date']} for episode {episode_id}") return earliest_grab["date"] - _log("WARNING", f"No reliable import events found for episode {episode_id}") + _log("WARNING", f"No reliable import events found for episode {episode_id} - should use air date instead") return None