playlist package script
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user