""" Configuration loader per MediaTrack. Delega a app.config_loader (Single Source of Truth: config.json). """ import sys from pathlib import Path # Fix PYTHONPATH: questo file รจ in MyICR_Suite/app/modules/mediatrack/backend/ # Aggiungiamo MyICR_Suite/ al path per permettere "from app.config_loader import ..." _myicr_suite_dir = Path(__file__).resolve().parent.parent.parent.parent if str(_myicr_suite_dir) not in sys.path: sys.path.insert(0, str(_myicr_suite_dir)) from app.config_loader import get_db_path _cached_path = None def get_database_path() -> str: """Ottiene path database MediaTrack (con caching).""" global _cached_path if _cached_path is None: _cached_path = str(get_db_path('mediatrack')) return _cached_path def clear_cache(): """Pulisce cache path database.""" global _cached_path _cached_path = None