diff --git a/VERSION b/VERSION index 70d5b25..c650d5a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.4.3 \ No newline at end of file +0.4.8 \ No newline at end of file diff --git a/lib/models/music_brainz/artist.rb b/lib/models/music_brainz/artist.rb index ba04265..18a33b8 100644 --- a/lib/models/music_brainz/artist.rb +++ b/lib/models/music_brainz/artist.rb @@ -44,7 +44,7 @@ module MusicBrainz def self.search name artists = [] xml = Nokogiri::XML(MusicBrainz.load( - 'http://musicbrainz.org/ws/2/artist/?query='+ URI.escape(name).gsub(/\&/, '%26').gsub(/\?/, '%3F') +'~&limit=50' + 'http://musicbrainz.org/ws/2/artist/?query='+ CGI.escape(name).gsub(/\!/, '') +'~&limit=50' )) xml.css('artist-list > artist').each do |a| artist = { diff --git a/lib/musicbrainz.rb b/lib/musicbrainz.rb index f256070..5314f1c 100644 --- a/lib/musicbrainz.rb +++ b/lib/musicbrainz.rb @@ -1,6 +1,7 @@ require "open-uri" require "socket" require "nokogiri" +require "cgi" require "models/music_brainz" require "models/music_brainz/artist"