changing log file variable

This commit is contained in:
Djan GICQUEL 2022-07-27 07:45:31 +02:00
parent 2c61717dc3
commit 9ff520c484

View File

@ -2,7 +2,7 @@
# VARIABLES
dir="$HOME/Téléchargements/"
file="/tmp/youtubedlurl_$(date +%d%b%Y%H%M%S).txt"
log="/tmp/youtubedlurl_$(date +%d%b%Y%H%M%S).txt"
youtubedlbinary="$HOME/bin/yt-dlp"
# FONCTIONS
@ -32,7 +32,7 @@ if [ "$choix" = "1" ];then
title=$($youtubedlbinary --get-title "$url")
f_telechcommence
$youtubedlbinary --output "%(title)s.%(ext)s" "$url" >> $file
$youtubedlbinary --output "%(title)s.%(ext)s" "$url" > $log
f_iferr
@ -41,7 +41,7 @@ elif [ "$choix" = "2" ];then
title=$($youtubedlbinary --get-title "$url")
f_telechcommence
$youtubedlbinary -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' --output "%(title)s.%(ext)s" "$url" >> $file
$youtubedlbinary -f 'bestvideo[height<=480]+bestaudio/best[height<=480]' --output "%(title)s.%(ext)s" "$url" > $log
f_iferr
@ -50,7 +50,7 @@ elif [ "$choix" = "3" ];then
title=$($youtubedlbinary --get-title "$url")
f_telechcommence
$youtubedlbinary --extract-audio --audio-format mp3 --output "%(title)s.%(ext)s" --restrict-filenames "$url" >> $file
$youtubedlbinary --extract-audio --audio-format mp3 --output "%(title)s.%(ext)s" --restrict-filenames "$url" > $log
f_iferr