Add playlist-dl script
parent
4e2f5a8bd6
commit
9ed0387ce2
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
echo "Looking up playlist name..."
|
||||
pl_line=$(youtube-dl --flat-playlist "$1" | grep "\[download\] Downloading playlist: ")
|
||||
pl_name=$(echo ${pl_line:33} | tr '/' ' ')
|
||||
|
||||
echo "Found playlist by name: $pl_name"
|
||||
echo "Downloading it into directory: $pl_name"
|
||||
|
||||
mkdir "$pl_name"
|
||||
cd "$pl_name"
|
||||
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "$1"
|
||||
cd ../
|
Loading…
Reference in New Issue