Fix: Scanner availability for series addition
- Change 'scanner' to 'serie_scanner' attribute name - Update tests to match SeriesApp attribute naming - Scanner now properly detected and called on add - All add_series tests passing (9/9)
This commit is contained in:
@@ -761,8 +761,8 @@ async def add_series(
|
||||
|
||||
# Step E: Trigger targeted scan for missing episodes
|
||||
try:
|
||||
if series_app and hasattr(series_app, "scanner"):
|
||||
missing_episodes = series_app.scanner.scan_single_series(
|
||||
if series_app and hasattr(series_app, "serie_scanner"):
|
||||
missing_episodes = series_app.serie_scanner.scan_single_series(
|
||||
key=key,
|
||||
folder=folder
|
||||
)
|
||||
@@ -776,12 +776,10 @@ async def add_series(
|
||||
if hasattr(series_app, "list") and hasattr(series_app.list, "keyDict"):
|
||||
if key in series_app.list.keyDict:
|
||||
series_app.list.keyDict[key].episodeDict = missing_episodes
|
||||
elif anime_service:
|
||||
# Fallback to anime_service if scanner not directly available
|
||||
# Note: This is a lightweight scan, not a full rescan
|
||||
logger.info(
|
||||
"Scanner not directly available, "
|
||||
"skipping targeted scan for %s",
|
||||
else:
|
||||
# Scanner not available - this shouldn't happen in normal operation
|
||||
logger.warning(
|
||||
"Scanner not available for targeted scan of %s",
|
||||
key
|
||||
)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user