web: scan updates
Local Docker Build (Dev) / build-dev (push) Successful in 7s

This commit is contained in:
2025-10-28 15:38:27 -04:00
parent 1dbad2f50b
commit a1a04b2711
+7
View File
@@ -797,12 +797,17 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N
paths_to_scan.extend(config.movie_paths)
for scan_path in paths_to_scan:
print(f"DEBUG: Checking scan_path: {scan_path}, exists: {scan_path.exists()}")
if not scan_path.exists():
print(f"DEBUG: Path does not exist, skipping: {scan_path}")
continue
print(f"DEBUG: scan_type={scan_type}, path={path}, scan_path in tv_paths: {scan_path in config.tv_paths}")
if scan_type in ["both", "tv"] and (scan_path in config.tv_paths or path):
# Handle specific season/episode path
print(f"DEBUG: Entered TV processing branch")
if path and scan_path.name.lower().startswith('season'):
print(f"DEBUG: Taking season processing path")
# Single season processing
series_path = scan_path.parent
tv_processor_obj = dependencies.get("tv_processor")
@@ -815,6 +820,7 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N
except Exception as e:
print(f"ERROR: Failed processing season {scan_path}: {e}")
elif path and scan_path.is_file() and scan_path.suffix.lower() in ('.mkv', '.mp4', '.avi'):
print(f"DEBUG: Taking single episode processing path")
# Single episode processing
season_path = scan_path.parent
series_path = season_path.parent
@@ -828,6 +834,7 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N
except Exception as e:
print(f"ERROR: Failed processing episode {scan_path}: {e}")
else:
print(f"DEBUG: Taking series processing path")
# Check if this path itself is a series (has IMDb ID in directory name or NFO files)
tv_processor_obj = dependencies.get("tv_processor")
sonarr_client = tv_processor_obj.sonarr if tv_processor_obj and hasattr(tv_processor_obj, 'sonarr') else None