dev #66
@@ -797,12 +797,17 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N
|
|||||||
paths_to_scan.extend(config.movie_paths)
|
paths_to_scan.extend(config.movie_paths)
|
||||||
|
|
||||||
for scan_path in paths_to_scan:
|
for scan_path in paths_to_scan:
|
||||||
|
print(f"DEBUG: Checking scan_path: {scan_path}, exists: {scan_path.exists()}")
|
||||||
if not scan_path.exists():
|
if not scan_path.exists():
|
||||||
|
print(f"DEBUG: Path does not exist, skipping: {scan_path}")
|
||||||
continue
|
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):
|
if scan_type in ["both", "tv"] and (scan_path in config.tv_paths or path):
|
||||||
# Handle specific season/episode path
|
# Handle specific season/episode path
|
||||||
|
print(f"DEBUG: Entered TV processing branch")
|
||||||
if path and scan_path.name.lower().startswith('season'):
|
if path and scan_path.name.lower().startswith('season'):
|
||||||
|
print(f"DEBUG: Taking season processing path")
|
||||||
# Single season processing
|
# Single season processing
|
||||||
series_path = scan_path.parent
|
series_path = scan_path.parent
|
||||||
tv_processor_obj = dependencies.get("tv_processor")
|
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:
|
except Exception as e:
|
||||||
print(f"ERROR: Failed processing season {scan_path}: {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'):
|
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
|
# Single episode processing
|
||||||
season_path = scan_path.parent
|
season_path = scan_path.parent
|
||||||
series_path = season_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:
|
except Exception as e:
|
||||||
print(f"ERROR: Failed processing episode {scan_path}: {e}")
|
print(f"ERROR: Failed processing episode {scan_path}: {e}")
|
||||||
else:
|
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)
|
# Check if this path itself is a series (has IMDb ID in directory name or NFO files)
|
||||||
tv_processor_obj = dependencies.get("tv_processor")
|
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
|
sonarr_client = tv_processor_obj.sonarr if tv_processor_obj and hasattr(tv_processor_obj, 'sonarr') else None
|
||||||
|
|||||||
Reference in New Issue
Block a user