diff --git a/app/controllers/artists_controller.rb b/app/controllers/artists_controller.rb index 86ce765db..f72be2ce1 100644 --- a/app/controllers/artists_controller.rb +++ b/app/controllers/artists_controller.rb @@ -118,9 +118,7 @@ class ArtistsController < ApplicationController end def finder - url = Sources::Site.new(params[:url]).normalize_for_artist_finder! - - @artists = Artist.url_matches(url).order("id desc").limit(20) + @artists = Artist.url_matches(params[:url]).order("id desc").limit(20) respond_with(@artists) do |format| format.xml do render :xml => @artists.to_xml(:include => [:urls], :root => "artists") diff --git a/app/models/artist.rb b/app/models/artist.rb index 9df4fc03d..f12dfa551 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -22,6 +22,7 @@ class Artist < ActiveRecord::Base module ClassMethods def find_all_by_url(url) + url = Sources::Site.new(url).normalize_for_artist_finder! url = ArtistUrl.normalize(url) artists = []