TOOLS/youtube-dl_mpv.sh: simplify $MPV handling

This commit is contained in:
shdown 2014-08-30 20:30:21 +04:00 committed by wm4
parent 43d4667028
commit cbe03b6255
1 changed files with 1 additions and 5 deletions

View File

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