youpy-ruby-echonest 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/echonest/api.rb CHANGED
@@ -160,12 +160,11 @@ module Echonest
160
160
 
161
161
  block.call(response)
162
162
  rescue Echonest::Api::Error => e
163
- if e.message =~ /Analysis not ready/
163
+ case e.message
164
+ when /Analysis not ready/
164
165
  sleep 20 # wait for serverside analysis
165
166
  get_trackinfo(method, filename, &block)
166
- end
167
- rescue Error => e
168
- if e.message == 'Invalid parameter: unknown MD5 file hash'
167
+ when 'Invalid parameter: unknown MD5 file hash'
169
168
  upload(filename)
170
169
  sleep 60 # wait for serverside analysis
171
170
  get_trackinfo(method, filename, &block)
@@ -1,3 +1,3 @@
1
1
  module Echonest
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youpy-ruby-echonest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - youpy