This commit is contained in:
2026-03-22 22:41:56 -07:00
parent 67ba6cb3d1
commit 23a73a94e6
6 changed files with 956 additions and 179 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -20,7 +20,7 @@ This helper is intentionally minimal: one request at a time, last-write-wins.
from __future__ import annotations
MEDEIA_MPV_HELPER_VERSION = "2026-03-22.6"
MEDEIA_MPV_HELPER_VERSION = "2026-03-23.1"
import argparse
import json
@@ -1197,6 +1197,17 @@ def _acquire_ipc_lock(ipc_path: str) -> Optional[Any]:
lock_path = _get_ipc_lock_path(ipc_path)
fh = open(lock_path, "a+", encoding="utf-8", errors="replace")
# On Windows, locking a zero-length file can fail even when no process
# actually owns the lock anymore. Prime the file with a single byte so
# stale empty lock files do not wedge future helper startups.
try:
fh.seek(0, os.SEEK_END)
if fh.tell() < 1:
fh.write("\n")
fh.flush()
except Exception:
pass
if os.name == "nt":
try:
import msvcrt # type: ignore

View File

@@ -0,0 +1 @@
{"choices":["local","rpi"]}

View File

@@ -1,2 +1,2 @@
# Medeia MPV script options
store=rpi
store=local