Last active
August 29, 2015 13:55
-
-
Save nonchip/8741097 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host="my_password@mpd_host" | |
page_url="$1" | |
echo "Page url: $page_url" | |
flv_format="$(youtube-dl -F "$page_url" | grep 'flv' | head -n 1 | cut -f 1)" || exit 1 | |
echo "FLV format: $flv_format" | |
video_url="$(youtube-dl -g -f $flv_format "$page_url")" || exit 1 | |
echo "Video url: $video_url" | |
mpc -h $host add "$video_url" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment