This commit is contained in:
2026-01-23 18:40:00 -08:00
parent 883ac2a283
commit b79e3b309b
4 changed files with 57 additions and 37 deletions

View File

@@ -557,24 +557,7 @@ def _load_config_best_effort() -> dict:
try:
from SYS.config import load_config
# `SYS.config.load_config()` defaults to loading `config.conf` from the
# SYS/ directory, but this repo keeps `config.conf` at the repo root.
# MPV.lyric is often spawned from mpv (not the CLI), so we must locate
# the repo root ourselves.
try:
repo_root = Path(__file__).resolve().parent.parent
except Exception:
repo_root = None
cfg = None
if repo_root is not None:
try:
cfg = load_config(config_dir=repo_root)
except Exception:
cfg = None
if cfg is None:
cfg = load_config()
cfg = load_config()
return cfg if isinstance(cfg, dict) else {}
except Exception: