Fixing tests
This commit is contained in:
@@ -21,19 +21,17 @@ module MusicBrainz
|
||||
end
|
||||
|
||||
def search(xml)
|
||||
artists = []
|
||||
xml.css("artist-list > artist").each do |a|
|
||||
artists << {
|
||||
xml.css("artist-list > artist").map do |a|
|
||||
{
|
||||
:name => a.first_element_child.text.gsub(/[`’]/, "'"),
|
||||
:sort_name => safe_get_value(a, "sort-name").gsub(/[`’]/, "'"),
|
||||
:score => (safe_get_attr(a, nil, "score") .to_i rescue 0),
|
||||
:score => (safe_get_attr(a, nil, "score").to_i rescue 0),
|
||||
:desc => safe_get_value(a, "disambiguation"),
|
||||
:type => safe_get_attr(a, nil, "type"),
|
||||
:mbid => safe_get_attr(a, nil, "id"),
|
||||
:aliases => a.css("alias-list > alias").map { |item| item.text }
|
||||
}
|
||||
end
|
||||
artists
|
||||
end
|
||||
|
||||
def release_groups(xml)
|
||||
|
||||
Reference in New Issue
Block a user