mirror of https://github.com/mpv-player/mpv
TOOLS/umpv: support shell-quotes in $MPV
This commit is contained in:
parent
33e73f4efd
commit
c8a90001f2
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue