fix: Correct IMDb ID pattern matching in TV show webhook processing #45

Merged
sbcrumb merged 2 commits from sonarr-matching into dev 2025-10-12 10:47:02 -04:00
Showing only changes of commit 41bccb82b1 - Show all commits
+2 -1
View File
@@ -62,7 +62,8 @@ def find_media_path_by_imdb_and_title(
# Search by IMDb ID first (more reliable) # Search by IMDb ID first (more reliable)
if imdb_id: if imdb_id:
pattern = str(media_path / f"*[imdb-{imdb_id}]*") # Use proper glob pattern - escape brackets to match literal [imdb-ID]
pattern = str(media_path / f"*\\[imdb-{imdb_id}\\]*")
matches = glob.glob(pattern) matches = glob.glob(pattern)
if matches: if matches:
return Path(matches[0]) return Path(matches[0])