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 +3 -4
- data/lib/echonest/version.rb +1 -1
- metadata +1 -1
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
|
-
|
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
|
-
|
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)
|
data/lib/echonest/version.rb
CHANGED