streamlink/streamlink-use-mpv.patch

67 lines
2.9 KiB
Diff
Raw Normal View History

diff -ruN a/src/streamlink_cli/argparser.py b/src/streamlink_cli/argparser.py
--- a/src/streamlink_cli/argparser.py 2017-11-14 14:21:36.000000000 +0100
+++ b/src/streamlink_cli/argparser.py 2017-12-20 14:53:28.380643193 +0100
@@ -309,7 +309,7 @@
metavar="COMMAND",
default=find_default_player(),
help="""
- Player to feed stream data to. By default, VLC will be used
+ Player to feed stream data to. By default, MPV will be used
if it can be found in its default location.
This is a shell-like syntax to support using a specific player:
diff -ruN a/src/streamlink_cli/main.py b/src/streamlink_cli/main.py
--- a/src/streamlink_cli/main.py 2017-11-14 14:21:36.000000000 +0100
+++ b/src/streamlink_cli/main.py 2017-12-20 14:54:42.376865280 +0100
@@ -72,7 +72,7 @@
http = namedpipe = None
if not args.player:
- console.exit("The default player (VLC) does not seem to be "
+ console.exit("The default player (MPV) does not seem to be "
"installed. You must specify the path to a player "
"executable with --player.")
@@ -132,7 +132,7 @@
if not external:
if not args.player:
- console.exit("The default player (VLC) does not seem to be "
+ console.exit("The default player (MPV) does not seem to be "
"installed. You must specify the path to a player "
"executable with --player.")
diff -ruN a/src/streamlink_cli/utils/player.py b/src/streamlink_cli/utils/player.py
--- a/src/streamlink_cli/utils/player.py 2017-11-14 14:21:36.000000000 +0100
+++ b/src/streamlink_cli/utils/player.py 2017-12-20 14:56:12.896766846 +0100
@@ -15,23 +15,23 @@
def find_default_player():
if "darwin" in sys.platform:
paths = os.environ.get("PATH", "").split(":")
- paths += ["/Applications/VLC.app/Contents/MacOS/"]
- paths += ["~/Applications/VLC.app/Contents/MacOS/"]
- path = check_paths(("VLC", "vlc"), paths)
+ paths += ["/Applications/MPV.app/Contents/MacOS/"]
+ paths += ["~/Applications/MPV.app/Contents/MacOS/"]
+ path = check_paths(("MPV", "mpv"), paths)
elif "win32" in sys.platform:
- exename = "vlc.exe"
+ exename = "mpv.exe"
paths = os.environ.get("PATH", "").split(";")
path = check_paths((exename,), paths)
if not path:
- subpath = "VideoLAN\\VLC\\"
+ subpath = "MPV\\"
envvars = ("PROGRAMFILES", "PROGRAMFILES(X86)", "PROGRAMW6432")
paths = filter(None, (os.environ.get(var) for var in envvars))
paths = (os.path.join(p, subpath) for p in paths)
path = check_paths((exename,), paths)
else:
paths = os.environ.get("PATH", "").split(":")
- path = check_paths(("vlc",), paths)
+ path = check_paths(("mpv",), paths)
if path:
# Quote command because it can contain space