change youtube scripts to use yt-dlp instead of youtube-dl

This commit is contained in:
gutmet 2021-12-08 13:11:19 +01:00
parent 5c74862ec1
commit d78e6e3adb
5 changed files with 5 additions and 5 deletions

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
youtube-dl -i -f bestaudio --extract-audio --add-metadata "$1" yt-dlp -i -f bestaudio --extract-audio --add-metadata "$1"

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
youtube-dl -o '%(playlist_index)s-%(title)s.%(ext)s' "$1" yt-dlp -o '%(playlist_index)s-%(title)s.%(ext)s' "$1"

View File

@ -6,7 +6,7 @@
cmd="$1" cmd="$1"
playlistURL="$2" playlistURL="$2"
playlistJSON=`youtube-dl "$playlistURL" --flat-playlist -J` playlistJSON=`yt-dlp "$playlistURL" --flat-playlist -J`
playlistTitle=`echo "$playlistJSON" | jq -r '.title'` playlistTitle=`echo "$playlistJSON" | jq -r '.title'`
playlistInfo="$playlistTitle" playlistInfo="$playlistTitle"

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
youtube-par-cmd "youtube-dl" "$1" youtube-par-cmd "yt-dlp" "$1"

View File

@ -6,7 +6,7 @@ playlistURL="$1"
noItems="$2" noItems="$2"
playlistJSON=`youtube-dl "$playlistURL" --flat-playlist -J --playlist-end "$noItems"` playlistJSON=`yt-dlp "$playlistURL" --flat-playlist -J --playlist-end "$noItems"`
uploader=`echo "$playlistJSON" | jq -r '.uploader'` uploader=`echo "$playlistJSON" | jq -r '.uploader'`
if [ "$uploader" = "null" ] || [ "$uploader" = "" ]; then if [ "$uploader" = "null" ] || [ "$uploader" = "" ]; then
uploader=`echo "$playlistJSON" | jq -r '.title'` uploader=`echo "$playlistJSON" | jq -r '.title'`