summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-26 20:47:30 +0200
committerwm4 <wm4@nowhere>2014-08-26 20:47:30 +0200
commit3ec6705e3410e96d74b108cb444b826749d8217c (patch)
tree0207007d6432cb01a1837c165e230fa2c22c90d3 /TOOLS
parent3cc3dea915b069b1d5d38170f8cc9ea8f5fcc213 (diff)
downloadmpv-3ec6705e3410e96d74b108cb444b826749d8217c.tar.bz2
mpv-3ec6705e3410e96d74b108cb444b826749d8217c.tar.xz
TOOLS: youtube wrapper: allow overriding mpv binary
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/youtube-dl_mpv.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/TOOLS/youtube-dl_mpv.sh b/TOOLS/youtube-dl_mpv.sh
index cfa34573bc..b16a054a5e 100755
--- a/TOOLS/youtube-dl_mpv.sh
+++ b/TOOLS/youtube-dl_mpv.sh
@@ -6,6 +6,10 @@ cookies_dir="$(mktemp -d /tmp/youtube-dl_mpv.XXXX)"
cookies_file="${cookies_dir}/cookies"
user_agent="$(youtube-dl --dump-user-agent)" # or set whatever you want
+if [ -z "$MPV" ] ; then
+ MPV=mpv
+fi
+
video_url="$(youtube-dl \
--user-agent="$user_agent" \
--cookies="$cookies_file" \
@@ -14,7 +18,7 @@ video_url="$(youtube-dl \
shift
-mpv \
+$MPV \
--cookies \
--cookies-file="$cookies_file" \
--user-agent="$user_agent" \