fix: Stop touching season.nfo/tvshow.nfo and debug missing NFO metadata
Local Docker Build (Dev) / build-dev (push) Successful in 24s

Changes:
- Disabled creation/updating of season.nfo and tvshow.nfo files
  NFOGuard should only manage episode NFO files, not series-level files

- Added debugging output to track aired/dateadded values in NFO updates
  The example NFO was missing these crucial fields despite processing
  Debug logs will show if data is being passed correctly to update function

This ensures NFOGuard only manages episode-level metadata files and
helps identify why some NFO files are missing the dateadded/aired fields.
This commit is contained in:
2025-09-26 09:09:58 -04:00
parent e502c3625b
commit dc648a4963
3 changed files with 11 additions and 12 deletions
+1 -1
View File
@@ -1 +1 @@
1.9.5
1.9.6
+7
View File
@@ -988,13 +988,20 @@ class NFOManager:
episode_elem.text = str(episode_num)
# Dates at the end
print(f"🔍 NFO Update Debug - aired: '{aired}', dateadded: '{dateadded}'")
if aired:
aired_elem = ET.SubElement(episode, "aired")
aired_elem.text = aired[:10] if len(aired) >= 10 else aired
print(f"✅ Added aired field: {aired}")
else:
print(f"⚠️ No aired date provided")
if dateadded:
dateadded_elem = ET.SubElement(episode, "dateadded")
dateadded_elem.text = dateadded
print(f"✅ Added dateadded field: {dateadded}")
else:
print(f"⚠️ No dateadded provided")
# Add NFOGuard comment at the bottom with other NFOGuard fields
nfoguard_comment = ET.Comment(f" Updated by {self.manager_brand} - Source: {source} ")
+3 -11
View File
@@ -122,18 +122,10 @@ class TVProcessor:
# Save to database
self.db.upsert_episode_date(imdb_id, season, episode, aired, dateadded, source, True)
# Create season/tvshow NFOs
# Skip season/tvshow NFO creation - only manage episode NFOs
# (season.nfo and tvshow.nfo should be left untouched)
if config.manage_nfo:
seasons_processed = set()
for (season, episode) in disk_episodes.keys():
if season not in seasons_processed:
season_dir = series_path / config.tv_season_dir_format.format(season=season)
self.nfo_manager.create_season_nfo(season_dir, season)
seasons_processed.add(season)
# Get TVDB ID for better Emby compatibility
tvdb_id = self.external_clients.get_tvdb_series_id(imdb_id)
self.nfo_manager.create_tvshow_nfo(series_path, imdb_id, tvdb_id)
_log("DEBUG", "Skipping season.nfo and tvshow.nfo creation - only managing episode NFOs")
_log("INFO", f"Completed processing TV series: {series_path.name}")