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" cookies_file="${cookies_dir}/cookies"
user_agent="$(youtube-dl --dump-user-agent)" # or set whatever you want user_agent="$(youtube-dl --dump-user-agent)" # or set whatever you want
if [ -z "$MPV" ] ; then
MPV=mpv
fi
video_url="$(youtube-dl \ video_url="$(youtube-dl \
--user-agent="$user_agent" \ --user-agent="$user_agent" \
--cookies="$cookies_file" \ --cookies="$cookies_file" \
@ -17,7 +13,7 @@ video_url="$(youtube-dl \
"$@")" "$@")"
set -f set -f
$MPV \ ${MPV:-mpv} \
--cookies \ --cookies \
--cookies-file="$cookies_file" \ --cookies-file="$cookies_file" \
--user-agent="$user_agent" \ --user-agent="$user_agent" \