This commit is contained in:
nose
2025-11-27 18:35:06 -08:00
parent 9eff65d1af
commit ed417c8200
6 changed files with 143 additions and 93 deletions

20
CLI.py
View File

@@ -603,7 +603,17 @@ def _create_cmdlet_cli():
# Initialize debug logging if enabled
if config:
from helper.logger import set_debug
set_debug(config.get("debug", False))
debug_enabled = config.get("debug", False)
set_debug(debug_enabled)
# Also configure standard logging for libraries that use it (like local_library.py)
if debug_enabled:
import logging
logging.basicConfig(
level=logging.DEBUG,
format='[%(name)s] %(levelname)s: %(message)s',
stream=sys.stderr
)
# Handle seeds if provided
if seeds_json:
@@ -677,10 +687,16 @@ def _create_cmdlet_cli():
# Check MPV availability at startup
try:
from hydrus_health_check import check_mpv_availability, initialize_matrix_health_check, initialize_hydrus_health_check
from hydrus_health_check import (
check_mpv_availability,
initialize_matrix_health_check,
initialize_hydrus_health_check,
initialize_local_library_scan
)
check_mpv_availability()
initialize_hydrus_health_check(config)
initialize_matrix_health_check(config)
initialize_local_library_scan(config)
except Exception as e:
debug(f"⚠ Could not check service availability: {e}")
except Exception: