fix: fetch series name from provider when scanning

Avoid 'Series name cannot be empty' error when a Serie is loaded
from a serie_file with an empty name by fetching the title from the
provider after year-fetching in the scan() method.

fix #?
This commit is contained in:
2026-06-02 20:57:27 +02:00
parent 4dc5ffa19e
commit 75f743e6cc

View File

@@ -454,6 +454,24 @@ class SerieScanner:
str(e)
)
# Fetch series name from provider if not already set
if not serie.name:
try:
fetched_name = self.loader.get_title(serie.key)
if fetched_name:
serie.name = fetched_name
logger.info(
"Fetched name from provider: %s (name=%s)",
serie.key,
serie.name
)
except Exception as e:
logger.warning(
"Could not fetch name for %s: %s",
serie.key,
str(e)
)
# Delegate the provider to compare local files with
# remote metadata, yielding missing episodes per
# season. Results are saved back to disk so that both