pirate-autonzb 0.2.4 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,4 +1,4 @@
1
- autonzb.gemspec
1
+ asset/failure.png
2
2
  bin/autonzb
3
3
  lib/imdb.rb
4
4
  lib/inspector.rb
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('autonzb', '0.2.4') do |p|
6
+ Echoe.new('autonzb', '0.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/asset/failure.png ADDED
Binary file
data/autonzb.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{autonzb}
5
- s.version = "0.2.4"
5
+ s.version = "0.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"]
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.email = %q{pirate.2061@gmail.com}
13
13
  s.executables = ["autonzb"]
14
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 = ["autonzb.gemspec", "bin/autonzb", "lib/imdb.rb", "lib/inspector.rb", "lib/movie.rb", "lib/nfo.rb", "lib/nzb.rb", "Manifest", "Rakefile", "README.markdown"]
15
+ s.files = ["asset/failure.png", "bin/autonzb", "lib/imdb.rb", "lib/inspector.rb", "lib/movie.rb", "lib/nfo.rb", "lib/nzb.rb", "Manifest", "Rakefile", "README.markdown", "autonzb.gemspec"]
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
@@ -38,9 +38,13 @@ module AutoNZB extend OptiFlagSet
38
38
  and_process!
39
39
  end
40
40
 
41
- inspector = Inspector.new(ARGV.flags.movies || '', :year => ARGV.flags.year,
42
- :imdb_score => ARGV.flags.imdb,
43
- :srt => ARGV.flags.srt,
44
- :backup => ARGV.flags.backup)
41
+ begin
42
+ inspector = Inspector.new(ARGV.flags.movies || '', :year => ARGV.flags.year,
43
+ :imdb_score => ARGV.flags.imdb,
44
+ :srt => ARGV.flags.srt,
45
+ :backup => ARGV.flags.backup)
45
46
 
46
- nzbmatrix = NZB.new(inspector, ARGV.flags.d, :age => ARGV.flags.age, :pages => ARGV.flags.pages)
47
+ nzbmatrix = NZB.new(inspector, ARGV.flags.d, :age => ARGV.flags.age, :pages => ARGV.flags.pages)
48
+ rescue => e
49
+ Inspector.growl("AutoNZB Error!", e)
50
+ end
data/lib/imdb.rb CHANGED
@@ -34,7 +34,7 @@ private
34
34
 
35
35
  def set_doc
36
36
  if link
37
- @doc = Hpricot(open(link.gsub(/\/$/,'')))
37
+ @doc = Hpricot(open(link.gsub(/\/\s*$/,'')))
38
38
  else
39
39
  query = "#{@name} (#{@year})"
40
40
  search_url = "http://www.imdb.com/find?q=#{CGI::escape(query)}"
data/lib/inspector.rb CHANGED
@@ -68,6 +68,9 @@ class Inspector
68
68
  end
69
69
  end
70
70
 
71
+ def self.growl(title, msg, pri = 0)
72
+ system("/usr/local/bin/growlnotify -w -n autosub --image #{File.dirname(__FILE__) + "/../asset/failure.png"} -p #{pri} -m #{msg.inspect} #{title} &")
73
+ end
71
74
 
72
75
  private
73
76
 
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.2.4
4
+ version: "0.3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pirate
@@ -72,7 +72,7 @@ extra_rdoc_files:
72
72
  - lib/nzb.rb
73
73
  - README.markdown
74
74
  files:
75
- - autonzb.gemspec
75
+ - asset/failure.png
76
76
  - bin/autonzb
77
77
  - lib/imdb.rb
78
78
  - lib/inspector.rb
@@ -82,6 +82,7 @@ files:
82
82
  - Manifest
83
83
  - Rakefile
84
84
  - README.markdown
85
+ - autonzb.gemspec
85
86
  has_rdoc: true
86
87
  homepage: http://github.com/pirate/autonzb
87
88
  post_install_message: