fix: Only fallback to airdate when Sonarr has no import date
Local Docker Build (Dev) / build-dev (pull_request) Successful in 23s
Local Docker Build (Dev) / build-dev (pull_request) Successful in 23s
- 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
This commit is contained in:
@@ -131,8 +131,9 @@ class TVProcessor:
|
|||||||
if not dateadded:
|
if not dateadded:
|
||||||
source = "external"
|
source = "external"
|
||||||
|
|
||||||
# Use air date as fallback for dateadded if available
|
# ONLY use air date as fallback for dateadded if we have no Sonarr import date at all
|
||||||
if not dateadded and aired:
|
# and if we couldn't get any import information from Sonarr history
|
||||||
|
if not dateadded and aired and source != "sonarr:history.import":
|
||||||
dateadded = aired
|
dateadded = aired
|
||||||
source = f"{source}_fallback" if source != "unknown" else "aired_fallback"
|
source = f"{source}_fallback" if source != "unknown" else "aired_fallback"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user