aboutsummaryrefslogtreecommitdiff
path: root/yts
diff options
context:
space:
mode:
Diffstat (limited to 'yts')
-rwxr-xr-xyts11
1 files changed, 6 insertions, 5 deletions
diff --git a/yts b/yts
index 21149c8..77082ca 100755
--- a/yts
+++ b/yts
@@ -1,9 +1,7 @@
#!/bin/sh
-# official
-# url_yts="https://yts.mx"
-# proxy
-url_yts="https://yts.torrentbay.to"
+url_yts="https://yts.mx"
+proxy_yts="https://yts.torrentbay.to"
die()
{
@@ -71,7 +69,7 @@ main()
out=
query=
- dep_check "dmenu" "pirowatch"
+ dep_check "dmenu" "pirowatch" "curl"
if [ "$#" -gt 0 ] && [ "$1" = "-o" ]
then
@@ -84,6 +82,9 @@ main()
[ -z "$query" ] &&
die "please enter a query"
+ curl -Is "$url_yts" > /dev/null ||
+ url_yts="$proxy_yts"
+
fetch="$(search_yts "$query")"
dllink="$(dllink_yts "$(echo "$fetch" | dmenu -l 25 -p " ")")"