From 5ade28c1181418bf761c73e35bb8ba39411bb165 Mon Sep 17 00:00:00 2001 From: sbcrumb Date: Sun, 5 Oct 2025 10:42:35 -0400 Subject: [PATCH] fix: Only fallback to airdate when Sonarr has no import date - Modified fallback logic to only use airdate as dateadded when source is NOT 'sonarr:history.import' - This prevents using airdate fallback when Sonarr has valid import dates available - Ensures Sonarr import dates are prioritized over airdate fallbacks - Addresses issue where episodes with valid Sonarr import dates were still falling back to airdates --- VERSION | 2 +- processors/tv_processor.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 815e68d..09843e3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.8 +2.0.9 diff --git a/processors/tv_processor.py b/processors/tv_processor.py index 54b5698..dccd780 100644 --- a/processors/tv_processor.py +++ b/processors/tv_processor.py @@ -131,8 +131,9 @@ class TVProcessor: if not dateadded: source = "external" - # Use air date as fallback for dateadded if available - if not dateadded and aired: + # ONLY use air date as fallback for dateadded if we have no Sonarr import date at all + # and if we couldn't get any import information from Sonarr history + if not dateadded and aired and source != "sonarr:history.import": dateadded = aired source = f"{source}_fallback" if source != "unknown" else "aired_fallback"