Compare commits
3 Commits
a3f7fbe68e
...
59f562c2fa
| Author | SHA1 | Date | |
|---|---|---|---|
| 59f562c2fa | |||
| 716dcc05e8 | |||
| 000d57e9fe |
@@ -64,8 +64,11 @@ def find_media_path_by_imdb_and_title(
|
|||||||
if imdb_id:
|
if imdb_id:
|
||||||
# Use proper glob pattern - escape brackets to match literal [imdb-ID]
|
# Use proper glob pattern - escape brackets to match literal [imdb-ID]
|
||||||
pattern = str(media_path / f"*\\[imdb-{imdb_id}\\]*")
|
pattern = str(media_path / f"*\\[imdb-{imdb_id}\\]*")
|
||||||
|
print(f"🔍 Searching with pattern: {pattern}")
|
||||||
matches = glob.glob(pattern)
|
matches = glob.glob(pattern)
|
||||||
|
print(f"🔍 Pattern matches found: {len(matches)} - {matches[:3] if matches else 'None'}")
|
||||||
if matches:
|
if matches:
|
||||||
|
print(f"✅ Returning first match: {matches[0]}")
|
||||||
return Path(matches[0])
|
return Path(matches[0])
|
||||||
|
|
||||||
# Search by title as fallback
|
# Search by title as fallback
|
||||||
|
|||||||
Reference in New Issue
Block a user