diff --git a/youtube-dl-pseudogui.sh b/youtube-dl-pseudogui.sh index 3b7e9a9..4677e42 100755 --- a/youtube-dl-pseudogui.sh +++ b/youtube-dl-pseudogui.sh @@ -30,11 +30,12 @@ zenity --width=600 --window-icon=~/.icons/youtube.png --title=youtube-dl --text cd "$dir" || exit # GESTION DES CHOIX -choix=$(zenity --list --title=youtubedl --hide-header --hide-column=1 --column=1 --column=2 \ -1 "Télécharger une vidéo (HD)" \ -2 "Télécharger une vidéo (SD)" \ -3 "Télécharger une musique/audio" \ -4 "Mettre à jour yt-dlp") +choix=$(zenity --height=400 --list --title=youtubedl --hide-header --hide-column=1 --column=1 --column=2 \ +1 "Télécharger une vidéo Youtube (HD)" \ +2 "Télécharger une vidéo Youtube (SD)" \ +3 "Télécharger une vidéo (original)" \ +4 "Télécharger une musique/audio" \ +5 "Mettre à jour yt-dlp") if [ "$choix" = "1" ];then url=$(zenity --width 500 --entry --title "url à télécharger (HD)") @@ -53,8 +54,16 @@ elif [ "$choix" = "2" ];then $youtubedlbinary -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' --output "%(title)s.%(ext)s" "$url" | tee $log | ZenityPulsate f_iferr - elif [ "$choix" = "3" ];then + url=$(zenity --width 500 --entry --title "url à télécharger (original)") + title=$($youtubedlbinary --get-title "$url") + + f_telechcommence + $youtubedlbinary --output "%(title)s.%(ext)s" "$url" | tee $log | ZenityPulsate + f_iferr + + +elif [ "$choix" = "4" ];then url=$(zenity --width 500 --entry --title "url à télécharger (audio)") title=$($youtubedlbinary --get-title "$url") @@ -63,7 +72,7 @@ elif [ "$choix" = "3" ];then f_iferr -elif [ "$choix" = "4" ];then +elif [ "$choix" = "5" ];then return=$($youtubedlbinary --update) notify-send -t 60000 -i youtube "yt-dlp" "Mise à jour terminée\n\n$return" fi