Fixed 'author' command inconsistencies
This commit is contained in:
parent
c5b2cc7269
commit
1be0689fe0
16
ytlib.sh
16
ytlib.sh
|
@ -739,16 +739,16 @@ function playlist_author_invocation {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if echo "$url" | grep -qv "youtube"; then
|
if echo "$url" | grep -qv "youtube"; then
|
||||||
url="https://www.youtube.com/playlist?list=${1}"
|
url="https://www.youtube.com/playlist?list=${url}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
html="$(gendl "$url")"
|
html="$(gendl "$url")"
|
||||||
|
|
||||||
case "$view" in
|
case "$view" in
|
||||||
"url") playlist_author_url "$html" ;;
|
"url") playlist_author_url "$html" ;;
|
||||||
"name") playlist_author_name "$html" ;;
|
"name") playlist_author_name "$html" ;;
|
||||||
"both") echo "$(playlist_author_name "$html")"
|
"both")
|
||||||
echo "$(playlist_author_url "$html")"
|
echo "$(playlist_author_name "$html") | $(playlist_author_url "$html")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -880,16 +880,16 @@ function video_author_invocation {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if echo "$url" | grep -qv "youtube"; then
|
if echo "$url" | grep -qv "youtube"; then
|
||||||
url="https://www.youtube.com/watch?v=${1}"
|
url="https://www.youtube.com/watch?v=${url}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
html="$(gendl "$url")"
|
html="$(gendl "$url")"
|
||||||
|
|
||||||
case "$view" in
|
case "$view" in
|
||||||
"url") video_author_url "$html" ;;
|
"url") video_author_url "$html" ;;
|
||||||
"name") video_author_name "$html" ;;
|
"name") video_author_name "$html" ;;
|
||||||
"both") echo "$(video_author_name "$html")"
|
"both")
|
||||||
echo "$(video_author_url "$html")"
|
echo "$(video_author_name "$html") | $(video_author_url "$html")"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue