diff --git a/playlist/playlist b/playlist/playlist new file mode 100644 index 0000000..ba0f4fd --- /dev/null +++ b/playlist/playlist @@ -0,0 +1,2 @@ +#!/bin/sh +argv0="$0"; shift; "$argv0"_"$0" "$@" diff --git a/playlist/playlist_package b/playlist/playlist_package new file mode 100644 index 0000000..dda0da8 --- /dev/null +++ b/playlist/playlist_package @@ -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