download_tv 2.6.8 → 2.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/download_tv/grabbers/torrentapi.rb +6 -3
- data/lib/download_tv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '003218a860babed3e80f3e3c49d0ec1b34b5cb4ccd5f3d76e6cb22c7d1bba398'
|
4
|
+
data.tar.gz: 6f0f5d1b4fc0837cfdfa04b0a6d9cc1a3af93488d13b3f571de7813beb65e0c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20aa26d49b8227b6243f408d8946a0646d26f2ee4621605fa09c6ec4945a74775b6980622722652c40deb3414708610a938f34d623c790249738245c201b884e
|
7
|
+
data.tar.gz: e0a7a099cd21b7e5e8a9ee477bdd20a2bd5da61f5ed3a33d0d2adc0e6878b31c6bfedade3e7880c3006afd284800a85e88119b8608ae2ba10671d1d687d80850
|
data/CHANGELOG.md
CHANGED
@@ -12,8 +12,9 @@ module DownloadTV
|
|
12
12
|
super('https://torrentapi.org/pubapi_v2.php?'\
|
13
13
|
'mode=search&search_string=%s&token=%s&'\
|
14
14
|
'app_id=DownloadTV&sort=seeders')
|
15
|
-
@wait =
|
15
|
+
@wait = 1.5
|
16
16
|
@token = nil
|
17
|
+
@retries_left = 5
|
17
18
|
end
|
18
19
|
|
19
20
|
##
|
@@ -63,7 +64,7 @@ module DownloadTV
|
|
63
64
|
obj = request_and_parse(search)
|
64
65
|
end
|
65
66
|
|
66
|
-
|
67
|
+
until obj['error_code'] != TOO_MANY_REQUESTS_ERROR && (obj['rate_limit'].nil? || obj['rate_limit'] == false)
|
67
68
|
sleep(@wait)
|
68
69
|
obj = request_and_parse(search)
|
69
70
|
end
|
@@ -75,10 +76,12 @@ module DownloadTV
|
|
75
76
|
|
76
77
|
names.zip(links)
|
77
78
|
rescue Mechanize::ResponseCodeError => e
|
78
|
-
if e.response_code == '429'
|
79
|
+
if (e.response_code == '429' || e.response_code == '520') && @retries_left > 0
|
79
80
|
sleep(@wait)
|
81
|
+
@retries_left -= 1
|
80
82
|
retry
|
81
83
|
end
|
84
|
+
raise NoTorrentsError
|
82
85
|
end
|
83
86
|
end
|
84
87
|
end
|
data/lib/download_tv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: download_tv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- guille
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|