tvdbr 0.0.4 → 0.0.5

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/lib/tvdbr/client.rb CHANGED
@@ -21,7 +21,7 @@ module Tvdbr
21
21
  return self.find_series_by_title(options[:title]) if options[:starring].nil?
22
22
  series_results = self.find_all_series_by_title(options[:title])
23
23
  expected_actors = options[:starring].split(",")
24
- series_results.find { |series| series.actor_match?(expected_actors) }
24
+ series_results.compact.find { |series| series.actor_match?(expected_actors) }
25
25
  end
26
26
 
27
27
  # Yields the block for every updated series
@@ -107,7 +107,11 @@ module Tvdbr
107
107
  # tvdb.get_with_key("/some/url", :query => { :foo => "bar" })
108
108
  def get_with_key(*args)
109
109
  args[0] = "/#{@api_key}/" + args[0]
110
- self.class.get(*args)
110
+ begin
111
+ self.class.get(*args)
112
+ rescue Exception => e
113
+ { 'Data' => nil }
114
+ end
111
115
  end
112
116
 
113
117
  # Checks if the api key works by retrieving mirrors
data/lib/tvdbr/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tvdbr
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvdbr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Miso
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-18 00:00:00 -08:00
19
+ date: 2011-01-19 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency