youtube-dl_mpv.sh: use curly braces and double quotes consistently

This commit is contained in:
Vítor Galvão 2015-01-22 21:26:14 +00:00
parent 2575c01c77
commit 86f4fcf1e2
1 changed files with 8 additions and 8 deletions

View File

@ -6,17 +6,17 @@ 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
video_url="$(youtube-dl \
--user-agent="$user_agent" \
--cookies="$cookies_file" \
video_url=$(youtube-dl \
--user-agent="${user_agent}" \
--cookies="${cookies_file}" \
--get-url \
"$@")"
"$@")
set -f
${MPV:-mpv} \
--cookies \
--cookies-file="$cookies_file" \
--user-agent="$user_agent" \
-- $video_url
--cookies-file="${cookies_file}" \
--user-agent="${user_agent}" \
-- "${video_url}"
rm -rf "$cookies_dir"
rm -rf "${cookies_dir}"