1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

TOOLS: youtube wrapper: allow overriding mpv binary

This commit is contained in:
wm4 2014-08-26 20:47:30 +02:00
parent 3cc3dea915
commit 3ec6705e34

View File

@ -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" \