sonarr-matching #48

Merged
sbcrumb merged 4 commits from sonarr-matching into dev 2025-10-12 11:02:36 -04:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit a5b2381023 - Show all commits
+1 -1
View File
@@ -1 +1 @@
2.0.25
2.0.26
+6
View File
@@ -56,8 +56,11 @@ def find_media_path_by_imdb_and_title(
_log("WARNING", f"Failed to process webhook path {webhook_path}: {e}")
# Search by IMDb ID or title in configured paths
print(f"🔍 Total search paths to check: {len(search_paths)} - {[str(p) for p in search_paths]}")
for media_path in search_paths:
print(f"🔍 Checking path: {media_path} (exists: {media_path.exists()})")
if not media_path.exists():
print(f"❌ Skipping non-existent path: {media_path}")
continue
# Search by IMDb ID first (more reliable)
@@ -74,10 +77,13 @@ def find_media_path_by_imdb_and_title(
# Search by title as fallback
if title:
title_clean = clean_title_for_search(title)
print(f"🔍 Title fallback: searching for '{title}' → cleaned: '{title_clean}'")
for item in media_path.iterdir():
if item.is_dir() and "[imdb-" in item.name.lower():
item_clean = clean_title_for_search(item.name)
print(f"🔍 Checking directory: '{item.name}' → cleaned: '{item_clean}'")
if title_clean in item_clean:
print(f"✅ Title match found: '{title_clean}' in '{item_clean}' → returning {item}")
return item
return None