From 5b9f5c44e154443f31f57e3bd33981842536d96d Mon Sep 17 00:00:00 2001 From: sbcrumb Date: Sat, 11 Oct 2025 13:12:36 -0400 Subject: [PATCH] Fix TV processor TIER 2 fallback logic for NFO files with aired but no dateadded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue was that TIER 2 (NFO cache) wasn't applying the aired date fallback when NFO files contained aired dates but no dateadded values. This caused episodes like "The Chosen" to show "no date added just air" because the system would find lockdata in TIER 2 but reject it due to missing dateadded, without applying the fallback logic. Changes: - Enhanced TIER 2 NFO processing to apply aired->dateadded fallback - Added debug logging for NFO fallback cases - Updated version to 2.0.23 🤖 Generated with [Claude Code](https://claude.ai/code) --- VERSION | 2 +- processors/tv_processor.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1b8629f..18f812f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.22 +2.0.23 diff --git a/processors/tv_processor.py b/processors/tv_processor.py index ce32815..4546036 100644 --- a/processors/tv_processor.py +++ b/processors/tv_processor.py @@ -153,6 +153,12 @@ class TVProcessor: dateadded = nfo_data.get('dateadded') source = nfo_data.get('source', 'nfo_cache') + # Apply fallback logic if NFO has aired but no dateadded + if not dateadded and aired: + dateadded = aired + source = f"{source}_aired_fallback" if source != 'nfo_cache' else 'nfo_aired_fallback' + _log("DEBUG", f"S{season:02d}E{episode:02d}: NFO has aired but no dateadded, using aired as fallback: {dateadded}") + if dateadded: episode_dates[(season, episode)] = (aired, dateadded, source) nfo_cache_hits += 1