Minor fixes

This commit is contained in:
magnolia-fan
2011-12-01 10:09:18 +04:00
parent f76dea062c
commit bc98085090
8 changed files with 50 additions and 26 deletions
+1 -1
View File
@@ -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
View File
@@ -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"]