1
0
Fork 0
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:
Connor Olding 2018-07-28 23:02:02 +02:00
parent 437009cd79
commit cbda9bee65

View File

@ -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]" \