Skip to content

Commit

Permalink
mpv-xwinwrap: Simplify video validation
Browse files Browse the repository at this point in the history
I'm retarded. No need to check the HTTP header because youtube-dl fails in that case anyway.
  • Loading branch information
rehashedsalt committed Jun 23, 2018
1 parent 67746ee commit 09f6b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mpv-xwinwrap
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09f6b2d

Please sign in to comment.