Resolution limit

This commit is contained in:
Nox Sluijtman 2024-10-29 12:52:29 +01:00
parent 7677856d0a
commit 518e1df27c

View file

@ -36,10 +36,25 @@ def main [ url: string
} }
} }
def "main download" [url: string] { def "main download" [url: string, --max-res(-m): string] {
yt-dlp --embed-chapters --embed-metadata --embed-subs (parse_url $url) match ($max_res | is-empty) {
true => {
yt-dlp --embed-chapters --embed-metadata --embed-subs (parse_url $url)
}
false => {
yt-dlp --embed-chapters --embed-metadata --embed-subs -f $'bestvideo[height<=($max_res)]+bestaudio' (parse_url $url)
}
}
} }
def "main dl" [url: string] { def "main dl" [url: string, --max-res(-m): string] {
yt-dlp --embed-chapters --embed-metadata --embed-subs (parse_url $url) match ($max_res | is-empty) {
true => {
yt-dlp --embed-chapters --embed-metadata --embed-subs (parse_url $url)
}
false => {
yt-dlp --embed-chapters --embed-metadata --embed-subs -f $'bestvideo[height<=($max_res)]+bestaudio' (parse_url $url)
}
}
} }