From 09f6b2d9ec678e29e12fe6d7a3509dba300ddc2e Mon Sep 17 00:00:00 2001 From: Salt Date: Fri, 22 Jun 2018 20:09:21 -0500 Subject: [PATCH] mpv-xwinwrap: Simplify video validation I'm retarded. No need to check the HTTP header because youtube-dl fails in that case anyway. --- mpv-xwinwrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpv-xwinwrap b/mpv-xwinwrap index a7242f9..2478d4d 100755 --- a/mpv-xwinwrap +++ b/mpv-xwinwrap @@ -40,7 +40,7 @@ function video-play { } function video-validate { - if [[ "$(curl -Is $1 | head -1)" = *"200"* ]] && [[ "$1" = *"youtu"* ]]; then + if youtube-dl -e $1; then return 0 fi return 1