changing default output to title.ext

This commit is contained in:
Djan GICQUEL 2022-06-28 09:06:27 +02:00
parent 66551267c5
commit b67bc3ca84
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ if [ "$choix" = "1" ];then
cd $dir
url=$(zenity --width 500 --entry --title "url à télécharger (HD)")
notify-send -i youtube "yt-dlp" "Téléchargement commencé ($url)"
$youtubedlbinary $url
$youtubedlbinary --output %(title)s.%(ext)s $url
if [ "$?" != "0" ]; then
echo "Erreur, le script va s'arreter."
notify-send -i youtube "yt-dlp erreur" "Une erreur est survenue dans le téléchargement de $url"
@ -27,7 +27,7 @@ elif [ "$choix" = "2" ];then
cd $dir
url=$(zenity --width 500 --entry --title "url à télécharger (SD)")
notify-send -i youtube "yt-dlp" "Téléchargement commencé\n$url"
$youtubedlbinary -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' $url
$youtubedlbinary -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' --output %(title)s.%(ext)s $url
if [ "$?" != "0" ]; then
echo "Erreur, le script va s'arreter."
notify-send -i youtube "yt-dlp erreur" "Une erreur est survenue dans le téléchargement de $url"
@ -40,7 +40,7 @@ elif [ "$choix" = "3" ];then
cd $dir
url=$(zenity --width 500 --entry --title "url à télécharger (audio)")
notify-send -i youtube "yt-dlp" "Téléchargement commencé ($url)"
$youtubedlbinary --extract-audio --audio-format mp3 --restrict-filenames $url
$youtubedlbinary --extract-audio --audio-format mp3 --output %(title)s.%(ext)s --restrict-filenames $url
if [ "$?" != "0" ]; then
echo "Erreur, le script va s'arreter."
notify-send -i youtube "yt-dlp erreur" "Une erreur est survenue dans le téléchargement de $url"