web: fix manual date fixes
Local Docker Build (Dev) / build-dev (push) Successful in 5s

This commit is contained in:
2025-10-26 11:29:35 -04:00
parent 2a972f0e14
commit cb46b56243
+4 -36
View File
@@ -597,42 +597,10 @@ async def update_episode_date(dependencies: dict, imdb_id: str, season: int, epi
has_video_file=episode_data.get('has_video_file', False) has_video_file=episode_data.get('has_video_file', False)
) )
# Create/update NFO file with new data # Note: NFO file updates are handled by the core container
nfo_manager = dependencies["nfo_manager"] # The web container only updates the database
config = dependencies["config"] print(f"✅ Database updated for {imdb_id} S{season:02d}E{episode:02d}")
print(f"️ NFO file updates will be handled by the core container on next scan")
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 # Add to processing history
db.add_processing_history( db.add_processing_history(