mirror of https://github.com/mpv-player/mpv
TOOLS/youtube-dl_mpv.sh: simplify $MPV handling
This commit is contained in:
parent
43d4667028
commit
cbe03b6255
|
@ -6,10 +6,6 @@ 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" \
|
||||
|
@ -17,7 +13,7 @@ video_url="$(youtube-dl \
|
|||
"$@")"
|
||||
|
||||
set -f
|
||||
$MPV \
|
||||
${MPV:-mpv} \
|
||||
--cookies \
|
||||
--cookies-file="$cookies_file" \
|
||||
--user-agent="$user_agent" \
|
||||
|
|
Loading…
Reference in New Issue