lib/meta-spotify/album.rb in meta-spotify-0.1.6 vs lib/meta-spotify/album.rb in meta-spotify-0.2.0
- old
+ new
@@ -29,19 +29,19 @@
@uri = hash['href'] if hash.has_key? 'href'
if hash['id'].is_a? Array
hash['id'].each do |id|
- case id.attributes['type']
+ case id['type']
when 'upc' then
- @upc = id
+ @upc = id['__content__']
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_id = id['__content__']
+ @allmusic_uri = id['href']
end
end
end
@available_territories = if hash.has_key?('availability') && !hash['availability']['territories'].nil?
@@ -57,6 +57,6 @@
def is_not_available_in?(territory)
!is_available_in?(territory)
end
end
-end
\ No newline at end of file
+end