download_tv 2.6.9 → 2.6.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f9321a9c253da7b28e0640b68e39be399dc0b4059f355c800d8e00b5f2457f3
4
- data.tar.gz: c947bc5589c19dd04c9bfddab3b3ae76b6ee05d5276784a3fe7a67441d7d1c52
3
+ metadata.gz: '003218a860babed3e80f3e3c49d0ec1b34b5cb4ccd5f3d76e6cb22c7d1bba398'
4
+ data.tar.gz: 6f0f5d1b4fc0837cfdfa04b0a6d9cc1a3af93488d13b3f571de7813beb65e0c7
5
5
  SHA512:
6
- metadata.gz: d40ceae3bea856057b13a6b492db047cdc4e190148d17697a737d92e36e2a334f48f722a0a8c9b4b56e3a1bad9649cd8e6be41f6606d5fcc103063e63e8bce48
7
- data.tar.gz: ef5892b6411c9cdcbd29c93345c842809b02f5c816c29a9596a4e100ac4fd6fea766241a3d76a01b964602d6f76f073c25430bc5839ff7ec6043cf8dd24afd88
6
+ metadata.gz: 20aa26d49b8227b6243f408d8946a0646d26f2ee4621605fa09c6ec4945a74775b6980622722652c40deb3414708610a938f34d623c790249738245c201b884e
7
+ data.tar.gz: e0a7a099cd21b7e5e8a9ee477bdd20a2bd5da61f5ed3a33d0d2adc0e6878b31c6bfedade3e7880c3006afd284800a85e88119b8608ae2ba10671d1d687d80850
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # download_tv CHANGELOG
2
2
 
3
+ ## 2.6.10 (2023-03-16)
4
+
5
+ * Fixes
6
+ * Bug fixes on the TorrentAPI grabber.
7
+
3
8
  ## 2.6.9 (2023-03-08)
4
9
 
5
10
  * Fixes
@@ -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 = 0.5
15
+ @wait = 1.5
16
16
  @token = nil
17
+ @retries_left = 5
17
18
  end
18
19
 
19
20
  ##
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DownloadTV
4
- VERSION = '2.6.9'
4
+ VERSION = '2.6.10'
5
5
  end
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.9
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: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler