url handler fix

This commit is contained in:
Luke Smith 2018-03-09 17:55:41 -07:00
parent 41a5f31ac7
commit 5ed354d0b5

View file

@ -11,8 +11,6 @@ vidsites="youtube.com
\|hooktube.com \|hooktube.com
\|bitchute.com \|bitchute.com
" "
detectVidSite() { (echo "$1" | grep "$vidsites">/dev/null) && mpv -quiet $1 > /dev/null & }
ext="${1##*.}" ext="${1##*.}"
mpvFiles="mkv mp4 gif" mpvFiles="mkv mp4 gif"
fehFiles="png jpg jpeg jpe" fehFiles="png jpg jpeg jpe"
@ -24,6 +22,8 @@ elif echo $mpvFiles | grep -w $ext > /dev/null; then
mpv --loop --quiet "$1" > /dev/null & mpv --loop --quiet "$1" > /dev/null &
elif echo $wgetFiles | grep -w $ext > /dev/null; then elif echo $wgetFiles | grep -w $ext > /dev/null; then
wget "$1" >/dev/null & wget "$1" >/dev/null &
elif echo "$1" | grep "$vidsites">/dev/null; then
mpv -quiet "$1" > /dev/null &
else else
detectVidSite "$1" $BROWSER "$1" 2>/dev/null & disown
fi fi