dev #18

Merged
sbcrumb merged 28 commits from dev into main 2025-09-27 17:52:46 -04:00
2 changed files with 50 additions and 41 deletions
Showing only changes of commit 27677e49f8 - Show all commits
+1 -1
View File
@@ -1 +1 @@
2.0.3-external-fallback
2.0.4-fallback-fix
+16 -7
View File
@@ -191,8 +191,9 @@ class TVSeriesProcessor:
series = self.sonarr.series_by_imdb(imdb_id)
if not series:
_log("WARNING", f"Series not found in Sonarr for IMDb: {imdb_id}")
return aired, dateadded, source
# Don't return here - fall through to external API fallback
pass
else:
# Get episodes for series
episodes = self.sonarr.episodes_for_series(series["id"])
target_episode = None
@@ -205,8 +206,8 @@ class TVSeriesProcessor:
if not target_episode:
_log("WARNING", f"Episode S{season_num:02d}E{episode_num:02d} not found in Sonarr")
return aired, dateadded, source
# Don't return here - fall through to external API fallback
else:
# Get airdate
aired = target_episode.get("airDateUtc")
@@ -317,13 +318,21 @@ class TVSeriesProcessor:
return None, "no_external_data"
def _create_series_nfos(self, series_path: Path, imdb_id: str):
"""Create tvshow.nfo and season.nfo files"""
# Create tvshow.nfo
"""Create tvshow.nfo and season.nfo files only if they don't exist"""
# Create tvshow.nfo only if it doesn't exist
tvshow_nfo = series_path / "tvshow.nfo"
if not tvshow_nfo.exists():
self.nfo_manager.create_tvshow_nfo(series_path, imdb_id)
else:
_log("DEBUG", f"Skipping tvshow.nfo creation - already exists: {tvshow_nfo}")
# Create season.nfo for each season directory
# Create season.nfo for each season directory only if they don't exist
for season_dir in series_path.iterdir():
if season_dir.is_dir() and self._is_season_directory(season_dir.name):
season_num = self._extract_season_number(season_dir.name)
if season_num is not None:
season_nfo = season_dir / "season.nfo"
if not season_nfo.exists():
self.nfo_manager.create_season_nfo(season_dir, season_num)
else:
_log("DEBUG", f"Skipping season.nfo creation - already exists: {season_nfo}")