testing: testing airdate pulls
Local Docker Build (Dev) / build-dev (push) Successful in 4s

This commit is contained in:
2025-10-16 09:29:29 -04:00
parent 8a3e01d966
commit 113b44b9ab
2 changed files with 38 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
2.2.19
2.2.20
+37
View File
@@ -529,6 +529,43 @@ async def update_episode_date(dependencies: dict, imdb_id: str, season: int, epi
has_video_file=episode_data.get('has_video_file', False)
)
# Create/update NFO file with new data
nfo_manager = dependencies["nfo_manager"]
config = dependencies["config"]
if config.manage_nfo:
try:
# Find the series directory based on IMDb ID
series_path = None
for tv_path in config.tv_paths:
for series_dir in Path(tv_path).iterdir():
if series_dir.is_dir() and imdb_id.lower() in series_dir.name.lower():
series_path = series_dir
break
if series_path:
break
if series_path:
season_dir = series_path / config.tv_season_dir_format.format(season=season)
if season_dir.exists():
nfo_manager.create_episode_nfo(
season_dir=season_dir,
season_num=season,
episode_num=episode,
aired=episode_data.get('aired'),
dateadded=dateadded,
source=source,
lock_metadata=config.lock_metadata
)
print(f"✅ Updated NFO file for {imdb_id} S{season:02d}E{episode:02d}")
else:
print(f"⚠️ Season directory not found: {season_dir}")
else:
print(f"⚠️ Series directory not found for {imdb_id}")
except Exception as e:
print(f"❌ Error updating NFO file for {imdb_id} S{season:02d}E{episode:02d}: {e}")
# Add to processing history
db.add_processing_history(
imdb_id=imdb_id,