pirate-autonzb 0.4.2 → 0.4.3
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/Manifest +1 -2
- data/README.markdown +5 -5
- data/Rakefile +1 -1
- data/autonzb.gemspec +4 -4
- data/bin/autonzb +3 -2
- data/lib/inspector.rb +6 -4
- data/lib/movie.rb +7 -2
- data/lib/nfo.rb +1 -1
- metadata +2 -4
data/Manifest
CHANGED
data/README.markdown
CHANGED
|
@@ -17,7 +17,7 @@ Will download new x264 HD movies nzb from newzleech.com, with imdb score >= 7.0,
|
|
|
17
17
|
|
|
18
18
|
autonzb -d /path/of/download/nzb/directory -movies /path/with/already/downloaded/movies -age 1 -imdb 7.5 -year 1980 -srt fr,en
|
|
19
19
|
|
|
20
|
-
Will download only new nzb of the day with imdb score >= 7.5, year >= 1980 and subtitles french or english.
|
|
20
|
+
Will download only new nzb of the day with imdb score >= 7.5, year >= 1980 and subtitles french or english (and unknown srt).
|
|
21
21
|
The -movies setting prevents already owned movies to be re-downloaded (only if the owned movie is 'better' than the new release)
|
|
22
22
|
|
|
23
23
|
more details with:
|
|
@@ -28,13 +28,13 @@ more details with:
|
|
|
28
28
|
|
|
29
29
|
AutoNZB use (and needs) specific folders name for your movies:
|
|
30
30
|
|
|
31
|
-
name of the movie (year) tag(s) format source sound encoding lang [srt(s)]
|
|
31
|
+
name of the movie (year) tag(s) format source sound encoding lang {imdb_id} [srt(s)]
|
|
32
32
|
|
|
33
|
-
Burn After Reading (2008) PROPER 1080p BluRay DTS x264 [fr,en]
|
|
34
|
-
Le Fabuleux Destin d'Amelie Poulain (2001) 720p BluRay x264 FRENCH [en]
|
|
33
|
+
Burn After Reading (2008) PROPER 1080p BluRay DTS x264 {tt0887883} [fr,en]
|
|
34
|
+
Le Fabuleux Destin d'Amelie Poulain (2001) 720p BluRay x264 FRENCH {tt0211915} [en]
|
|
35
35
|
...
|
|
36
36
|
|
|
37
|
-
## License
|
|
37
|
+
## MIT License
|
|
38
38
|
|
|
39
39
|
Copyright (c) 2008 Pirate
|
|
40
40
|
|
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.3') 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
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{autonzb}
|
|
5
|
-
s.version = "0.4.
|
|
5
|
+
s.version = "0.4.3"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Pirate"]
|
|
9
|
-
s.date = %q{2009-02-
|
|
9
|
+
s.date = %q{2009-02-09}
|
|
10
10
|
s.default_executable = %q{autonzb}
|
|
11
11
|
s.description = %q{Ruby tool to automatically download x264 HD nzb movies files from newzleech.com}
|
|
12
12
|
s.email = %q{pirate.2061@gmail.com}
|
|
13
13
|
s.executables = ["autonzb"]
|
|
14
|
-
s.extra_rdoc_files = ["bin/autonzb", "lib/imdb.rb", "lib/inspector.rb", "lib/movie.rb", "lib/nfo.rb", "lib/nzb.rb", "README.markdown"
|
|
15
|
-
s.files = ["asset/failure.png", "autonzb.gemspec", "bin/autonzb", "lib/imdb.rb", "lib/inspector.rb", "lib/movie.rb", "lib/nfo.rb", "lib/nzb.rb", "Manifest", "Rakefile", "README.markdown"
|
|
14
|
+
s.extra_rdoc_files = ["bin/autonzb", "lib/imdb.rb", "lib/inspector.rb", "lib/movie.rb", "lib/nfo.rb", "lib/nzb.rb", "README.markdown"]
|
|
15
|
+
s.files = ["asset/failure.png", "autonzb.gemspec", "bin/autonzb", "lib/imdb.rb", "lib/inspector.rb", "lib/movie.rb", "lib/nfo.rb", "lib/nzb.rb", "Manifest", "Rakefile", "README.markdown"]
|
|
16
16
|
s.has_rdoc = true
|
|
17
17
|
s.homepage = %q{http://github.com/pirate/autonzb}
|
|
18
18
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Autonzb", "--main", "README.markdown"]
|
data/bin/autonzb
CHANGED
|
@@ -13,8 +13,9 @@ module AutoNZB extend OptiFlagSet
|
|
|
13
13
|
end
|
|
14
14
|
optional_flag 'srt' do
|
|
15
15
|
description "Subtitle languages desired (separated by ,), ie 'fr,en'.
|
|
16
|
-
Add 'none' at the end if you want to download movies without subtitles too.
|
|
17
|
-
|
|
16
|
+
Add 'none' at the end if you want to download movies without subtitles too.
|
|
17
|
+
'unknown' is always added at the end, and nzb with unknown srt are always downloaded.
|
|
18
|
+
(Order is important to define if a nzb is needed) default: nil"
|
|
18
19
|
end
|
|
19
20
|
optional_flag 'imdb' do
|
|
20
21
|
description "IMDB score limit, default: 7.0"
|
data/lib/inspector.rb
CHANGED
|
@@ -7,7 +7,9 @@ class Inspector
|
|
|
7
7
|
def initialize(paths, options = {})
|
|
8
8
|
@paths = paths.split(',').map { |p| p.gsub(/\/$/,'') }
|
|
9
9
|
@options = options
|
|
10
|
-
|
|
10
|
+
p @options[:srt]
|
|
11
|
+
@options[:srt] = @options[:srt] ? (@options[:srt].split(',') - ["unknown"] + ['unknown']).uniq : nil
|
|
12
|
+
p @options[:srt]
|
|
11
13
|
@options[:imdb_score] = @options[:imdb_score] ? @options[:imdb_score].to_f : 7.0
|
|
12
14
|
@options[:year] = @options[:year] ? @options[:year].to_i : 1950
|
|
13
15
|
|
|
@@ -102,9 +104,9 @@ private
|
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
def valid?(movie)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
movie.
|
|
107
|
+
(@options[:srt].nil? || (((@options[:srt] - movie.srt).size < @options[:srt].size)) || movie.lang == 'FRENCH') &&
|
|
108
|
+
movie.year >= @options[:year] &&
|
|
109
|
+
movie.score >= @options[:imdb_score]
|
|
108
110
|
end
|
|
109
111
|
|
|
110
112
|
def srt_score(movie)
|
data/lib/movie.rb
CHANGED
|
@@ -137,9 +137,14 @@ private
|
|
|
137
137
|
if nfo
|
|
138
138
|
@srt = nfo.srt
|
|
139
139
|
elsif matched = @raw_name.match(/\[(.*)\]/)
|
|
140
|
-
matched[1].split(',')
|
|
140
|
+
srts = matched[1].split(',')
|
|
141
|
+
if srts.empty?
|
|
142
|
+
@srt << 'none'
|
|
143
|
+
else
|
|
144
|
+
srts.each { |srt| @srt << srt }
|
|
145
|
+
end
|
|
141
146
|
else
|
|
142
|
-
@srt << '
|
|
147
|
+
@srt << 'unknown'
|
|
143
148
|
end
|
|
144
149
|
end
|
|
145
150
|
|
data/lib/nfo.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pirate-autonzb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pirate
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-02-
|
|
12
|
+
date: 2009-02-09 00:00:00 -08:00
|
|
13
13
|
default_executable: autonzb
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -62,7 +62,6 @@ extra_rdoc_files:
|
|
|
62
62
|
- lib/nfo.rb
|
|
63
63
|
- lib/nzb.rb
|
|
64
64
|
- README.markdown
|
|
65
|
-
- tasks/test.rake
|
|
66
65
|
files:
|
|
67
66
|
- asset/failure.png
|
|
68
67
|
- autonzb.gemspec
|
|
@@ -75,7 +74,6 @@ files:
|
|
|
75
74
|
- Manifest
|
|
76
75
|
- Rakefile
|
|
77
76
|
- README.markdown
|
|
78
|
-
- tasks/test.rake
|
|
79
77
|
has_rdoc: true
|
|
80
78
|
homepage: http://github.com/pirate/autonzb
|
|
81
79
|
post_install_message:
|