Skip to content

Commit

Permalink
Fixed handling of empty Artist information answers.
Browse files Browse the repository at this point in the history
  • Loading branch information
xhochy committed Sep 25, 2010
1 parent 5cc06a2 commit 555f0af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/scrobbler/artist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def load_from_xml(node)
@listeners = childL2.content.to_i if childL2.name == 'listeners'
@playcount = childL2.content.to_i if childL2.name == 'playcount'
@playcount = childL2.content.to_i if childL2.name == 'plays'
end
end if not child.children.nil?
when 'similar'
# Ignore them for the moment, they are not stored.
when 'bio'
Expand Down Expand Up @@ -145,7 +145,7 @@ def load_info
doc.root.children.each do |childL1|
next unless childL1.name == 'artist'
load_from_xml(childL1)
end
end if (not doc.root.nil?) && (not doc.root.children.nil?)
@info_loaded = true
end # load_info

Expand Down

0 comments on commit 555f0af

Please sign in to comment.