Updated readme, discography method moved to Artist model, version bump

This commit is contained in:
Gregory Eremin
2011-09-14 13:08:03 +04:00
parent 0477633f8f
commit 7fdde0dfa1
5 changed files with 22 additions and 23 deletions
+6
View File
@@ -30,6 +30,12 @@ module MusicBrainz
@artist
end
def self.discography mbid
artist = self.find(mbid)
artist.release_groups.each {|rg| rg.releases.each {|r| r.tracks } }
artist
end
def self.find_by_name name
matches = self.search name
matches.length.zero? ? nil : self.find(matches.first[:mbid])