ytdl-music: added update check for yt-dlp and ffmpeg requirement
This commit is contained in:
parent
7d73529502
commit
36f1e6a5be
|
@ -10,5 +10,16 @@ if [ -z "$PLAYLISTURL" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! which ffmpeg > /dev/null 2>&1; then
|
||||||
|
echo "Error: ffmpeg is not installed. Please install ffmpeg before running this script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ffmpeg -version | head -n 1
|
||||||
|
|
||||||
|
yt-dlp -U || exit $?
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
# Use double quotes for variables within the yt-dlp command
|
# Use double quotes for variables within the yt-dlp command
|
||||||
yt-dlp -f 'ba' -x --audio-format mp3 "$PLAYLISTURL" -o "$TARGETPATH/$LIBRARY_NAME/%(playlist)s/%(title)s.%(ext)s"
|
yt-dlp -f 'ba' -x --audio-format mp3 "$PLAYLISTURL" -o "$TARGETPATH/$LIBRARY_NAME/%(playlist)s/%(title)s.%(ext)s"
|
||||||
|
|
Loading…
Reference in New Issue