Commit Graph

7 Commits

Author SHA1 Message Date
sbcrumb e3a119efd7 fix: Add automatic episode data lookup to NFO update method
Local Docker Build (Dev) / build-dev (push) Successful in 19s
Root cause identified: update_episode_nfo_preserving_name() was receiving
None values for aired/dateadded and just updating NFO with basic fields.

Fixed by:
- Adding automatic data fetching when missing episode data detected
- Passing imdb_id and tv_processor to enable API calls
- Added fallback logic to fetch from database/Sonarr when data missing
- Will show clear debug output when fetching missing data

Now when NFO files are updated, they will automatically get proper
dateadded and aired fields from the NFOGuard database or Sonarr API.

This should resolve the missing NFOGuard metadata in episode NFO files.
2025-09-26 09:31:19 -04:00
sbcrumb d8525a3ec0 fix: Implement proper episode data lookup for NFO updates
Local Docker Build (Dev) / build-dev (push) Successful in 29s
Root cause: NFO files were missing dateadded/aired because update logic
wasn't actually fetching episode data - just passing None values.

Fixed by implementing proper data lookup chain:
1. Check NFOGuard database for existing episode data
2. Query Sonarr API for import date (preferred for dateadded)
3. Get episode airdate from Sonarr
4. Fallback to using airdate as dateadded if no import date

Added _get_episode_dates_from_apis() method that follows the same
logic as regular episode processing, ensuring NFO updates get
proper dateadded and aired values instead of just basic metadata.

This should resolve the missing NFOGuard fields in episode NFO files.
2025-09-26 09:12:43 -04:00
sbcrumb dc648a4963 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.
2025-09-26 09:09:58 -04:00
sbcrumb 4980d1ae04 feat: Preserve TV episode NFO filenames matching video files
Local Docker Build (Dev) / build-dev (push) Successful in 29s
Instead of migrating long NFO names to standardized S01E01.nfo format,
now preserves original filenames that match video files while still
populating NFOGuard metadata (dateadded, aired, season, episode).

Changes:
- Added update_episode_nfo_preserving_name() method to NFOManager
- Added find_episode_nfo_matching_video() to locate NFO files by video name pattern
- Modified TVProcessor to update existing NFOs in-place rather than migrate names
- Episodes with existing NFOs now get "nfo_update_required" source for special handling

This maintains the user's preferred naming convention where NFO files
match their corresponding video files exactly.
2025-09-26 08:16:42 -04:00
sbcrumb 94590ac070 feat:add file cache system
Local Docker Build (Dev) / build-dev (push) Successful in 15s
2025-09-25 18:58:31 -04:00
sbcrumb 70302837a7 huge: update
Local Docker Build (Dev) / build-dev (push) Successful in 28s
2025-09-25 18:41:37 -04:00
sbcrumb 740f912b57 state2
Local Docker Build (Dev) / build-dev (push) Successful in 23s
2025-09-25 18:04:15 -04:00