tubetop: Remove validation checks
Fuck it Youtube-dl mysteriously returns 120 in a script and 0 when run from an interactive shell I'm not gonna investigate why Fuck it
This commit is contained in:
parent
7309c29728
commit
2cfc81d11f
13
tubetop
13
tubetop
@ -41,13 +41,6 @@ function video-play {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function video-validate {
|
|
||||||
if youtube-dl -e $1; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
function cache-add {
|
function cache-add {
|
||||||
if [[ "$cachecontent" == *"$1"* ]]; then
|
if [[ "$cachecontent" == *"$1"* ]]; then
|
||||||
return 1
|
return 1
|
||||||
@ -99,12 +92,6 @@ if cache-lookup-by-name "$input"; then
|
|||||||
printf "Lookup successful: $input\n"
|
printf "Lookup successful: $input\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! video-validate $input; then
|
|
||||||
hard-notify "Unable to Find Video" "Please verify that the URL is a valid video and try again."
|
|
||||||
printf "Not a valid stream: $input\n" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
soft-notify "Found Video" "Video $1 has been found and is buffering. It will be embedded in the desktop shortly."
|
soft-notify "Found Video" "Video $1 has been found and is buffering. It will be embedded in the desktop shortly."
|
||||||
|
|
||||||
cache-add $input
|
cache-add $input
|
||||||
|
Loading…
Reference in New Issue
Block a user