mirror of
https://github.com/notwa/rc
synced 2024-05-20 02:43:23 -07:00
check if file exists before trying youtube-dl
This commit is contained in:
parent
437009cd79
commit
cbda9bee65
|
@ -81,7 +81,7 @@ yt() {
|
|||
pushd ~/play >/dev/null
|
||||
local vid="$1"
|
||||
shift
|
||||
if [[ "$(expr substr "$vid" 1 4)" != "http" ]]; then
|
||||
if [[ ! -e "$vid" && "$(expr substr "$vid" 1 4)" != "http" ]]; then
|
||||
vid="ytdl://$vid"
|
||||
fi
|
||||
mpv --af=lavfi="[$_M_PROCESS]" \
|
||||
|
|
Loading…
Reference in New Issue
Block a user