diff --git a/youtube-par-cmd b/youtube-par-cmd index 2236114..753c559 100755 --- a/youtube-par-cmd +++ b/youtube-par-cmd @@ -8,6 +8,7 @@ playlistURL="$2" playlistJSON=`youtube-dl "$playlistURL" --flat-playlist -J` playlistTitle=`echo "$playlistJSON" | jq -r '.title'` +playlistInfo="$playlistTitle" output="$(mkdir "$playlistTitle")" status=$? @@ -23,6 +24,7 @@ echo "$urls" | awk '{print "https://www.youtube.com/watch?v=" $0}' | xargs -n 1 m3uFile="Playlist - $playlistTitle"".m3u" echo "#EXTM3U" > "$m3uFile" +echo "#PLAYLIST:$playlistInfo" >> "$m3uFile" echo "$urls" | while read url; do find . -name "*$url*" -prune >> "$m3uFile" done