debug: Add logging to diagnose Flow movie processing issue
Local Docker Build (Dev) / build-dev (push) Successful in 23s

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.
This commit is contained in:
2025-09-24 09:11:28 -04:00
parent e995c27655
commit bf7ee784a6
+5
View File
@@ -1005,6 +1005,8 @@ class MovieProcessor:
(config.movie_poll_mode == "if_missing" and existing and not existing.get("dateadded")) (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 # Use existing movie date decision logic
dateadded, source, released = self._decide_movie_dates(imdb_id, movie_path, should_query, existing) 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]]: 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""" """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: 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") return existing["dateadded"], existing["source"], existing.get("released")
# Query Radarr for movie info # Query Radarr for movie info