commit 1abcf3e

hovercats  ·  2024-11-04 07:18:43 +0000 UTC
parent d827658
ytdl: add -n switch to avoid having to run yt-dlp manually if url doesnt support the proxy string we use for some invidious instances
1 files changed,  +5, -2
+5, -2
 1@@ -13,6 +13,9 @@ if (~ $#* 0){
 2 	exit 1
 3 }
 4 
 5-val=`{yt-dlp -F $1 | grep '1080p' | tail -n 1 | awk '{print $1}'}
 6+if (~ $1 -n) proxy='' && url=$2
 7+if not url=$1
 8+
 9+val=`{yt-dlp -F $url | grep '1080p' | tail -n 1 | awk '{print $1}'}
10 if (~ $#val 0) val=bestvideo
11-exec yt-dlp -P $DLDIR -f $val+bestaudio $1$proxy
12+exec yt-dlp -P $DLDIR -f $val+bestaudio $url$proxy