tvdbr 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tvdbr/client.rb +2 -0
- data/lib/tvdbr/version.rb +1 -1
- metadata +3 -3
data/lib/tvdbr/client.rb
CHANGED
@@ -69,6 +69,7 @@ module Tvdbr
|
|
69
69
|
series_url = "/series/#{series_id}"
|
70
70
|
series_url << "/all" if options[:all]
|
71
71
|
result = self.get_with_key(series_url)['Data']
|
72
|
+
return nil unless result && result['Series']
|
72
73
|
return result if options[:all]
|
73
74
|
return result["Series"] if options[:raw]
|
74
75
|
Series.new(self, result["Series"])
|
@@ -80,6 +81,7 @@ module Tvdbr
|
|
80
81
|
def find_episode_by_id(episode_id, options={})
|
81
82
|
episode_url = "/episodes/#{episode_id}"
|
82
83
|
result = self.get_with_key(episode_url)['Data']
|
84
|
+
return nil unless result && result['Episode']
|
83
85
|
return result["Episode"] if options[:raw]
|
84
86
|
Episode.new(self, result["Episode"])
|
85
87
|
end
|
data/lib/tvdbr/version.rb
CHANGED
metadata
CHANGED