From bf7ee784a6724cf6448779d99211d0dbf24b2d7a Mon Sep 17 00:00:00 2001 From: SBCrumb Date: Wed, 24 Sep 2025 09:11:28 -0400 Subject: [PATCH] debug: Add logging to diagnose Flow movie processing issue Added debug logs to understand why Flow (2019) isn't calling external APIs while Ambush (2023) works correctly. This will show: - should_query calculation and reasoning - _decide_movie_dates entry point and logic path - Whether existing database data is being used incorrectly This should help identify why digital release date lookup works for some movies but not others with identical database states. --- nfoguard.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nfoguard.py b/nfoguard.py index 0f3369a..74b0b85 100644 --- a/nfoguard.py +++ b/nfoguard.py @@ -1005,6 +1005,8 @@ class MovieProcessor: (config.movie_poll_mode == "if_missing" and existing and not existing.get("dateadded")) ) + _log("DEBUG", f"Movie {imdb_id}: should_query={should_query}, poll_mode={config.movie_poll_mode}, existing={bool(existing)}, has_dateadded={bool(existing and existing.get('dateadded')) if existing else False}") + # Use existing movie date decision logic dateadded, source, released = self._decide_movie_dates(imdb_id, movie_path, should_query, existing) @@ -1055,7 +1057,10 @@ class MovieProcessor: def _decide_movie_dates(self, imdb_id: str, movie_path: Path, should_query: bool, existing: Optional[Dict]) -> Tuple[str, str, Optional[str]]: """Decide movie dates based on configuration and available data""" + _log("DEBUG", f"_decide_movie_dates for {imdb_id}: should_query={should_query}, existing={existing}") + if not should_query and existing: + _log("DEBUG", f"Using existing data without querying: dateadded={existing.get('dateadded')}, source={existing.get('source')}") return existing["dateadded"], existing["source"], existing.get("released") # Query Radarr for movie info