adding extract to mp3 option
This commit is contained in:
parent
d7d2f26b1c
commit
00baafe376
@ -114,6 +114,24 @@ $youtubedlbinary $url
|
||||
fi
|
||||
EOF
|
||||
|
||||
cat << "EOF" >> $HOME/bin/youtube-dl-audio.sh
|
||||
#! /bin/bash
|
||||
dir="$HOME/Téléchargements/"
|
||||
file="/tmp/youtubedlurl_$(date +%d%b%Y%H%M%S).txt"
|
||||
youtubedlbinary="$HOME/bin/yt-dlp"
|
||||
|
||||
cd $dir
|
||||
url=$(zenity --width 500 --entry --title "url à télécharger en audio")
|
||||
$youtubedlbinary --extract-audio --audio-format mp3 --restrict-filenames $url
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Erreur, le script va s'arreter."
|
||||
notify-send -i ~/.icons/youtube.png "yt-dlp erreur" "Une erreur est survenue dans le téléchargement de $url"
|
||||
exit
|
||||
else
|
||||
notify-send ~/.icons/youtube.png" "yt-dlp" "Téléchargement vidéo terminé."
|
||||
fi
|
||||
EOF
|
||||
|
||||
# Creation Fichier YoutubeDlUpdate
|
||||
cat << "EOF" > $HOME/bin/youtube-dl-update.sh
|
||||
#! /bin/bash
|
||||
@ -154,6 +172,17 @@ Exec=sh bin/youtube-dl-pseudogui.sh
|
||||
Icon=youtube
|
||||
EOF
|
||||
|
||||
cat << "EOF" > $HOME/.local/share/applications/youtube-dl-audio.desktop
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Categories=Utility;
|
||||
Name=youtubedl-audio
|
||||
Comment=Télécharger des vidéos sur Youtube au format mp3
|
||||
Exec=sh bin/youtube-dl-audio.sh
|
||||
Icon=youtube
|
||||
EOF
|
||||
|
||||
#---------------------------------------------------------
|
||||
# Ajout des icones
|
||||
#---------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user