fix: resolve series key from direct link format

When the search provider returns a link like 'shinobi-no-ittoki' instead of
'/anime/stream/shinobi-no-ittoki', the key was not being extracted and all
folders were marked as unresolved.

Now handles both link formats:
- URL format: '/anime/stream/key' -> extract key
- Direct format: 'key' -> use as-is

Also added debug logging for both resolution paths to aid troubleshooting.
This commit is contained in:
2026-06-05 21:21:39 +02:00
parent 01e4dec8d7
commit ebfbec1225

View File

@@ -154,6 +154,9 @@ class SetupService:
if SetupService._titles_match(result_name, title):
if result_link and '/anime/stream/' in result_link:
return result_link.split('/anime/stream/')[-1].split('/')[0]
elif result_link:
# Link is already the key (e.g., "shinobi-no-ittoki")
return result_link
else:
logger.debug(
"Series key resolved but link format unexpected",