Skip to content

Commit

Permalink
Added listener count to artists
Browse files Browse the repository at this point in the history
  • Loading branch information
scf4 committed Jul 21, 2011
1 parent 69a63a3 commit f7cbe61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rockstar/artist.rb
Expand Up @@ -58,7 +58,7 @@
# (62.160%) Christina Aguilera
module Rockstar
class Artist < Base
attr_accessor :name, :mbid, :playcount, :rank, :url, :thumbnail
attr_accessor :name, :mbid, :listenercount, :playcount, :rank, :url, :thumbnail
attr_accessor :summary, :content, :images, :count, :streamable
attr_accessor :chartposition

Expand Down Expand Up @@ -94,6 +94,7 @@ def load_info(xml=nil)
return self if xml.nil?

self.mbid = (xml).at(:mbid).inner_html if (xml).at(:mbid)
self.listenercount = (xml).at(:listeners).inner_html if (xml).at(:listeners)
self.playcount = (xml).at(:playcount).inner_html if (xml).at(:playcount)
self.chartposition = self.rank = xml['rank'] if xml['rank']
self.chartposition = self.rank = (xml).at(:rank).inner_html if (xml).at(:rank) if self.rank.nil?
Expand Down

0 comments on commit f7cbe61

Please sign in to comment.