mirror of
https://github.com/notwa/rc
synced 2025-03-15 22:42:50 -07:00
properly ignore --ytdl-format
and warn about it
This commit is contained in:
parent
2417352229
commit
899684f3ce
1 changed files with 6 additions and 4 deletions
|
@ -72,14 +72,16 @@ mpv_watch() { ### @-
|
|||
argc -ge 1 "$0" "$@" || return
|
||||
pushd ~/play >/dev/null
|
||||
local url="$1"; shift
|
||||
# checking for redundant flags might itself be redundant, but i want to be sure.
|
||||
local seen=0
|
||||
for a; do [ "$a" = "${a#--ytdl-format=}" ] || seen=1; done
|
||||
|
||||
local seen=0 A=()
|
||||
for a; do [ "$a" = "${a#--ytdl-format}" ] && A+=("$a") || seen=1; done
|
||||
[ $seen = 0 ] || printf '%s\n' 'NOTE: the --ytdl-format flag is temporarily ignored due to throttling issues.' >&2
|
||||
|
||||
mpv \
|
||||
--af=lavfi="[$_M_PROCESS]" \
|
||||
--ytdl-format=best \
|
||||
--ytdl-raw-options-append=compat-options=all \
|
||||
"$@" -- "$url"
|
||||
"${A[@]}" -- "$url"
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue