Minor fixes
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
0.5.2
|
||||
0.5.4
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{musicbrainz}
|
||||
s.version = "0.5.2"
|
||||
s.version = "0.5.4"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Gregory Eremin"]
|
||||
|
||||
Reference in New Issue
Block a user