1
0

youtube subscribe [channel]

This commit is contained in:
dtb 2022-11-03 01:36:47 -04:00
parent 7dcf8093ad
commit 79cda0bf83

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
set -e
id(){ id(){
youtube-dl --skip-download --print-json --playlist-items 1 "$1" \ youtube-dl --skip-download --print-json --playlist-items 1 "$1" \
| jq '.channel_id' \ | jq '.channel_id' \
@ -11,6 +13,13 @@ feedurl(){
} }
case "$1" in case "$1" in
channel) feedurl "$(id "$2")" ;; subscribe)
id) feedurl "$2" ;; url="$(feedurl "$(id "$2")")"
esac | xargs curl -o - -- pig_stow "$url"
;;
refresh)
pig_feed
;;
esac
exit 0