lib/meta-spotify/track.rb in meta-spotify-0.1.6 vs lib/meta-spotify/track.rb in meta-spotify-0.2.0
- old
+ new
@@ -23,18 +23,18 @@
@length = hash['length'].to_f if hash.has_key? 'length'
if hash['id'].is_a? Array
hash['id'].each do |id|
- case id.attributes['type']
+ case id['type']
when 'mbid' then
- @musicbrainz_id = id
- @musicbrainz_uri = id.attributes['href']
+ @musicbrainz_id = id['__content__']
+ @musicbrainz_uri = id['href']
when 'amgid' then
@allmusic_id = id
- @allmusic_uri = id.attributes['href']
+ @allmusic_uri = id['href']
end
end
end
end
end
-end
\ No newline at end of file
+end