better radarr debug

This commit is contained in:
2025-09-08 12:14:51 -04:00
parent 38bcb9cf28
commit 78f73845fd
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -288,7 +288,6 @@ class RadarrClient:
event.get("downloadPath", "")).lower()
if imported_path:
_log("DEBUG", f"Found potential import event ({event_type}) with path: {imported_path}")
movie_imdb = (movie_info.get("imdbId", "") or "").lower()
movie_title = (movie_info.get("title", "") or "").lower()
movie_year = str(movie_info.get("year", ""))
@@ -299,6 +298,7 @@ class RadarrClient:
f"[{movie_imdb}]" in imported_path or
movie_imdb in imported_path
):
_log("DEBUG", f"Found potential import event ({event_type}) matching IMDb {movie_imdb}: {imported_path}")
date_iso = datetime.fromisoformat(event["date"].replace("Z", "+00:00")).astimezone(timezone.utc).isoformat(timespec="seconds")
_log("INFO", f"✅ FOUND IMPORT: exact IMDb match at {date_iso}")
earliest_real_import = date_iso
@@ -317,6 +317,7 @@ class RadarrClient:
# Look for both title and year
if clean_title in clean_path and movie_year in clean_path:
_log("DEBUG", f"Found potential title/year match: {clean_title} ({movie_year}) in {clean_path}")
date_iso = datetime.fromisoformat(event["date"].replace("Z", "+00:00")).astimezone(timezone.utc).isoformat(timespec="seconds")
_log("INFO", f"✅ FOUND IMPORT: title/year match at {date_iso}")
earliest_real_import = date_iso