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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user