change youtube scripts to use yt-dlp instead of youtube-dl
This commit is contained in:
parent
5c74862ec1
commit
d78e6e3adb
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
youtube-par-cmd "youtube-dl" "$1"
|
youtube-par-cmd "yt-dlp" "$1"
|
||||||
|
|
|
@ -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'`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user