Minor fixes
This commit is contained in:
@@ -59,6 +59,13 @@ module MusicBrainz
|
||||
:type => self.safe_get_attr(a, nil, 'type'),
|
||||
:mbid => self.safe_get_attr(a, nil, 'id')
|
||||
}
|
||||
if artist[:type] == "Group"
|
||||
m = artist[:sort_name].match(/(.*?),\sThe$/)
|
||||
artist[:name] = artist[:sort_name] = "The #{m[1]}" if m
|
||||
elsif artist[:type] == "Person"
|
||||
m = artist[:sort_name].match(/(.+?),\s([^,]+?)$/)
|
||||
artist[:name] = artist[:sort_name] = "#{m[2]} #{m[1]}" if m
|
||||
end
|
||||
aliases = a.css('alias-list > alias').map{ |item| item.text }
|
||||
if aliases.include? name
|
||||
artist[:weight] += 20
|
||||
|
||||
Reference in New Issue
Block a user