playlist package script
This commit is contained in:
parent
c77ceae844
commit
a85b27e5fc
2
playlist/playlist
Normal file
2
playlist/playlist
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
argv0="$0"; shift; "$argv0"_"$0" "$@"
|
16
playlist/playlist_package
Normal file
16
playlist/playlist_package
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while read -r resource
|
||||||
|
do case "$resource" in
|
||||||
|
*.m3u) "$0" "$resource" >"$resource".tar
|
||||||
|
printf '%s.tar\n' "$resource"
|
||||||
|
;;
|
||||||
|
*://*) youtube-dl -f bestaudio "$resource" --id \
|
||||||
|
&& youtube-dl --get-id "$resource" \
|
||||||
|
| xargs printf '%s.*\n' \
|
||||||
|
|| curl -LO -w '%{filename_effective}' "$resource"
|
||||||
|
;;
|
||||||
|
*) printf '%s\n' "$resource"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done | xargs tar c
|
Loading…
Reference in New Issue
Block a user