This commit is contained in:
2025-06-12 20:53:13 +02:00
parent 98d186c1be
commit a3eef22394

View File

@@ -1,13 +1,45 @@
#!/bin/bash
## INSTALL
#termux-setup-storage
#pkg update
#pkg upgrade
#pkg install python3 ffmpeg wget
pip install --upgrade yt-dlp
#mkdir ~/bin
#wget https://...............termux-url-opener -P ~/bin
## INIT
#mkdir -p ~/bin
#wget https://gitea.140477.xyz/pierrick/termux_url_opener/raw/branch/main/termux-url-opener -P ~/bin
#chmod +x ~/bin/termux-url-opener
yt-dlp -f "bestvideo[height<=360]+bestaudio/best" $1
# Fonction pour l'installation
install() {
echo "Lancement de l'installation..."
termux-setup-storage
pkg update
pkg upgrade
pkg install python3 ffmpeg wget
pip install yt-dlp
}
# Fonction pour la mise à jour
update() {
echo "Lancement de la mise à jour..."
pip install --upgrade yt-dlp
}
# Analyse des options avec getopts
while getopts "iu" option; do
case $option in
i)
install
update
exit 0
;;
u)
update
exit 0
;;
*)
echo "Option invalide. Usage: $0 [-i | -u]"
exit 1
;;
esac
done
# Exécution par défaut si aucune option n'est fournie
yt-dlp -f "bestvideo[height<=360]+bestaudio/best" "$1"