From 0732b2e409d11682e76041ca2a9c591ab8cb2b69 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Mon, 11 Dec 2023 00:33:34 +0100 Subject: [PATCH] add extra parameter --- youtube.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youtube.sh b/youtube.sh index 123a8a2..047d184 100755 --- a/youtube.sh +++ b/youtube.sh @@ -6,14 +6,18 @@ if [ "$1" == "--help" ] then echo "bash ./youtube-dl.sh URL FORMAT" echo "Formate: [opus/m4a/video/hd/fullhd/4k]" + echo "Extra: (Zusätzliche Parameter)" exit 0 fi url="$1" format="$2" +extra="$3" [[ -z "${url}" ]] && read -p "URL: " url [[ -z "${format}" ]] && read -p "Format [opus/flac/m4a/mp4/video/hd/fullhd/4k]: " format +echo "Wenn man für alle Playlisten Unterordner anlegen will: [-o %(playlist_title)s/%(title)s.%(ext)s] (Praktisch für Downloads ganzer Kanäle" +[[ -z "${extra}" ]] && read -p "Sind noch zusätzliche Parameter gewünscht?: " extra if [ "$format" == "opus" ] then @@ -55,4 +59,4 @@ then format="-S "res:2160" -f "bv+ba/b"" fi -yt-dlp -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames --embed-thumbnail --embed-metadata --match-filter "!was_live" $format $audio $quality -v $url +yt-dlp -i -c --socket-timeout 10000 --force-ipv4 --restrict-filenames --embed-thumbnail --embed-metadata --match-filter "!was_live" ${format} ${audio} ${quality} -v ${url} ${extra}