This commit is contained in:
2026-01-03 03:37:48 -08:00
parent 6e9a0c28ff
commit 73f3005393
23 changed files with 1791 additions and 442 deletions

View File

@@ -488,7 +488,6 @@ class MPV:
tmp_dir = Path(os.environ.get("TEMP") or os.environ.get("TMP") or ".")
except Exception:
tmp_dir = Path(".")
log_path = str((tmp_dir / "medeia-mpv-lyric.log").resolve())
# Ensure the module can be imported even when the app is launched from a different cwd.
# Repo root = parent of the MPV package directory.
@@ -497,6 +496,17 @@ class MPV:
except Exception:
repo_root = Path.cwd()
# Prefer a stable in-repo log so users can inspect it easily.
log_path = None
try:
log_dir = (repo_root / "Log")
log_dir.mkdir(parents=True, exist_ok=True)
log_path = str((log_dir / "medeia-mpv-lyric.log").resolve())
except Exception:
log_path = None
if not log_path:
log_path = str((tmp_dir / "medeia-mpv-lyric.log").resolve())
py = sys.executable
if platform.system() == "Windows":
py = _windows_pythonw_exe(py) or py