TOOLS/umpv: support shell-quotes in $MPV

This commit is contained in:
sfan5 2023-01-06 19:49:17 +01:00
parent 33e73f4efd
commit c8a90001f2
1 changed files with 2 additions and 1 deletions

View File

@ -32,6 +32,7 @@ import socket
import errno import errno
import subprocess import subprocess
import string import string
import shlex
files = sys.argv[1:] files = sys.argv[1:]
@ -78,7 +79,7 @@ if sock:
else: else:
# Let mpv recreate socket if it doesn't already exist. # Let mpv recreate socket if it doesn't already exist.
opts = (os.getenv("MPV") or "mpv").split() opts = shlex.split(os.getenv("MPV") or "mpv")
opts.extend(["--no-terminal", "--force-window", "--input-ipc-server=" + SOCK, opts.extend(["--no-terminal", "--force-window", "--input-ipc-server=" + SOCK,
"--"]) "--"])
opts.extend(files) opts.extend(files)