mirror of
https://github.com/notwa/rc
synced 2025-03-16 06:52:49 -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
|
argc -ge 1 "$0" "$@" || return
|
||||||
pushd ~/play >/dev/null
|
pushd ~/play >/dev/null
|
||||||
local url="$1"; shift
|
local url="$1"; shift
|
||||||
# checking for redundant flags might itself be redundant, but i want to be sure.
|
|
||||||
local seen=0
|
local seen=0 A=()
|
||||||
for a; do [ "$a" = "${a#--ytdl-format=}" ] || seen=1; done
|
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 \
|
mpv \
|
||||||
--af=lavfi="[$_M_PROCESS]" \
|
--af=lavfi="[$_M_PROCESS]" \
|
||||||
--ytdl-format=best \
|
--ytdl-format=best \
|
||||||
--ytdl-raw-options-append=compat-options=all \
|
--ytdl-raw-options-append=compat-options=all \
|
||||||
"$@" -- "$url"
|
"${A[@]}" -- "$url"
|
||||||
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue