Fix MPV menu: resolve Lua syntax error and enhance logging

- Remove extra 'end)' that caused '<eof>' expected syntax error at line 2834
- Add comprehensive logging to M.show_menu() with [MENU] prefix
- Add logging wrappers to keybindings (m and mbtn_right)
- Implement fallback menu opening methods (commandv and command)
- Fix audio-display mpv.conf setting to 'no' (was invalid 'yes')
This commit is contained in:
2026-02-03 18:26:36 -08:00
parent cc19403087
commit 81b11a8517
6 changed files with 124 additions and 26 deletions

View File

@@ -577,6 +577,16 @@ def _append_helper_log(text: str) -> None:
print(f"[mpv-helper] {payload}", file=sys.stderr)
def _helper_log_path() -> str:
try:
log_dir = _repo_root() / "Log"
log_dir.mkdir(parents=True, exist_ok=True)
return str((log_dir / "medeia-mpv-helper.log").resolve())
except Exception:
tmp = tempfile.gettempdir()
return str((Path(tmp) / "medeia-mpv-helper.log").resolve())
def _acquire_ipc_lock(ipc_path: str) -> Optional[Any]:
"""Best-effort singleton lock per IPC path.
@@ -902,8 +912,6 @@ def main(argv: Optional[list[str]] = None) -> int:
# Also publish config temp directory if available
try:
from SYS.config import load_config
cfg = load_config()
temp_dir = cfg.get("temp", "").strip() or os.getenv("TEMP") or "/tmp"
if temp_dir: