pirate-autonzb 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/autonzb.gemspec +1 -1
- data/lib/imdb.rb +9 -0
- data/lib/inspector.rb +0 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
|
|
3
3
|
require 'rake'
|
4
4
|
require 'echoe'
|
5
5
|
|
6
|
-
Echoe.new('autonzb', '0.4.
|
6
|
+
Echoe.new('autonzb', '0.4.4') do |p|
|
7
7
|
p.description = "Ruby tool to automatically download x264 HD nzb movies files from newzleech.com"
|
8
8
|
p.url = "http://github.com/pirate/autonzb"
|
9
9
|
p.author = "Pirate"
|
data/autonzb.gemspec
CHANGED
data/lib/imdb.rb
CHANGED
@@ -8,6 +8,7 @@ class IMDB
|
|
8
8
|
attr_accessor :link, :doc, :id
|
9
9
|
|
10
10
|
def initialize(name, year = nil, link = nil)
|
11
|
+
@try = 3
|
11
12
|
@name, @year, @link = name, year, link
|
12
13
|
@coder = HTMLEntities.new
|
13
14
|
set_doc
|
@@ -60,6 +61,14 @@ private
|
|
60
61
|
@doc = doc
|
61
62
|
end
|
62
63
|
end
|
64
|
+
rescue
|
65
|
+
if @try > 0
|
66
|
+
@try -= 1
|
67
|
+
$stdout.print '*'
|
68
|
+
set_doc
|
69
|
+
else
|
70
|
+
@doc = nil
|
71
|
+
end
|
63
72
|
end
|
64
73
|
|
65
74
|
def set_id
|
data/lib/inspector.rb
CHANGED
@@ -7,9 +7,7 @@ class Inspector
|
|
7
7
|
def initialize(paths, options = {})
|
8
8
|
@paths = paths.split(',').map { |p| p.gsub(/\/$/,'') }
|
9
9
|
@options = options
|
10
|
-
p @options[:srt]
|
11
10
|
@options[:srt] = @options[:srt] ? (@options[:srt].split(',') - ["unknown"] + ['unknown']).uniq : nil
|
12
|
-
p @options[:srt]
|
13
11
|
@options[:imdb_score] = @options[:imdb_score] ? @options[:imdb_score].to_f : 7.0
|
14
12
|
@options[:year] = @options[:year] ? @options[:year].to_i : 1950
|
15
13
|
|