royw-tmdb 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/tmdb/tmdb_image.rb +5 -1
  3. metadata +2 -2
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 3
2
+ :patch: 4
3
3
  :major: 0
4
4
  :minor: 1
@@ -100,10 +100,13 @@ class TmdbImage
100
100
  unless movie[type].blank?
101
101
  images = movie[type]
102
102
  images.each do |image|
103
- if image['size'] == size
103
+ image_size = image['size']
104
+ image_size = image_size.first if image_size.respond_to?('first')
105
+ if image_size == size
104
106
  @logger.debug { "#{image.inspect}" }
105
107
  src_url = image['content']
106
108
  end
109
+ break unless src_url.blank?
107
110
  end
108
111
  end
109
112
  end
@@ -113,6 +116,7 @@ class TmdbImage
113
116
  # download the fanart
114
117
  # returns nil if no attempt to copy was made, 0 on error, or the image size in bytes on success
115
118
  def copy_image(src_url, dest_filespec)
119
+ @logger.debug { "copy_image(#{src_url}, #{dest_filespec})" }
116
120
  image_size = nil
117
121
  unless src_url.blank? || dest_filespec.blank?
118
122
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: royw-tmdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roy Wright
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-18 00:00:00 -07:00
12
+ date: 2009-04-19 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15