download_tv 2.4.5 → 2.4.6

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: a83c8f712d3164278b590595c703bb9d0e310ceac769db916e137ba264374655
4
- data.tar.gz: 9b2fa9d619719e1e850c05060212e1da23b5ffaa2b952d7a6fe5b84cf3809d09
3
+ metadata.gz: e377266cc2744dc9f250731064ea8c72bc41a1b7395e1d7f08d04df6e659fb6c
4
+ data.tar.gz: 9761596d5643b869e501c6f6df18343944050c10f946cefd09c604ff88a301ae
5
5
  SHA512:
6
- metadata.gz: 84421d6e23b7f9e5f76b2fd2746a829e70cdcd31be75367ea40ee942618ac89bcdf3fcb45e5da1e1997a4ea8acff1993aa87730d1b81a9450f8af196a887f938
7
- data.tar.gz: 67cca84d1ccaf3494feb43319aeb441ece1454f90919ee9babb9bf6cd1e6fbfb3d66f76434bfb817e712bbb7b4a564f7ef2c4e903192052bbdeab04d47001968
6
+ metadata.gz: 2cb1468ca23f32f8a172c7d0142a2177251ac3def0c3f66c64bd63295c1b9ac431e075c897004577332a13219e74c76d16429083b0c4986fe0f4651b5797af8b
7
+ data.tar.gz: 8525d7675966c1924cbb4e48740e59d2834c9c082668f87e00e1f813aea81ac7cdbdd6d8d8b63840b73e202beb8539425a0be2d7c88d95eeaf274948d397f05e
data/download_tv.gemspec CHANGED
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.require_paths = ['lib']
22
22
 
23
23
  s.executables = ['tv']
24
- s.default_executable = 'tv'
25
24
 
26
25
  s.add_development_dependency 'bundler', '~> 1.15'
27
26
  s.add_development_dependency 'rake', '~> 10.0'
@@ -30,6 +29,5 @@ Gem::Specification.new do |s|
30
29
  s.add_dependency('json')
31
30
  s.add_dependency('mechanize')
32
31
 
33
- s.has_rdoc = false
34
32
  s.license = 'MIT'
35
33
  end
@@ -17,8 +17,13 @@ module DownloadTV
17
17
  @agent.read_timeout = 2
18
18
  renew_token
19
19
  true
20
- rescue Mechanize::ResponseCodeError, Net::HTTP::Persistent::Error
21
- false
20
+ rescue Mechanize::ResponseCodeError, Net::HTTP::Persistent::Error => e
21
+ if e.response_code == '429'
22
+ sleep(@wait)
23
+ retry
24
+ else
25
+ false
26
+ end
22
27
  end
23
28
 
24
29
  ##
@@ -5,7 +5,8 @@ module DownloadTV
5
5
  attr_reader :g_instances, :tries
6
6
 
7
7
  def grabbers
8
- %w[TorrentAPI ThePirateBay Eztv KAT]
8
+ # %w[TorrentAPI ThePirateBay Eztv KAT]
9
+ %w[TorrentAPI ThePirateBay Eztv]
9
10
  end
10
11
 
11
12
  def initialize(default_grabber = nil)
@@ -1,3 +1,3 @@
1
1
  module DownloadTV
2
- VERSION = '2.4.5'.freeze
2
+ VERSION = '2.4.6'.freeze
3
3
  end
@@ -78,13 +78,6 @@ describe DownloadTV::Downloader do
78
78
  dl.filter_shows(links).must_equal res
79
79
  end
80
80
 
81
- it 'removes names with WEB in them' do
82
- dl = DownloadTV::Downloader.new(path: config_path)
83
- links = [['Link 1 WEBRIP', ''], ['Link 2 rip', ''], ['Link.720p.rip', '']]
84
- res = [['Link 2 rip', '']]
85
- dl.filter_shows(links).must_equal res
86
- end
87
-
88
81
  it 'removes names without PROPER or REPACK in them' do
89
82
  dl = DownloadTV::Downloader.new(path: config_path)
90
83
  links = [['Link 1', ''], ['Link 2 2160p', ''], ['Link 3', ''], ['Link 4 PROPER', ''], ['Link REPACK 5', '']]
data/test/torrent_test.rb CHANGED
@@ -24,7 +24,8 @@ describe DownloadTV::Torrent do
24
24
  describe 'when giving it a default grabber' do
25
25
  it 'has a default order' do
26
26
  t = DownloadTV::Torrent.new(nil)
27
- t.g_instances.first.class.name.must_equal 'DownloadTV::TorrentAPI'
27
+ expected = t.grabbers.map { |i| "DownloadTV::#{i}"}
28
+ t.g_instances.map { |i| i.class.name}.must_equal expected
28
29
  end
29
30
 
30
31
  %w[Eztv KAT ThePirateBay TorrentAPI].each do |g|
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.4.5
4
+ version: 2.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - guille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-04 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  version: '0'
135
135
  requirements: []
136
136
  rubyforge_project:
137
- rubygems_version: 2.7.6
137
+ rubygems_version: 2.7.7
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: DownloadTV is a tool that allows the user to find magnet links for tv show