#2404 fix artist finder

This commit is contained in:
Toks
2015-06-12 12:07:50 -04:00
parent 86ce1b8deb
commit f94d297149
2 changed files with 6 additions and 2 deletions

View File

@@ -119,6 +119,9 @@ class ArtistsController < ApplicationController
def finder
@artists = Artist.url_matches(params[:url]).order("id desc").limit(20)
if @artists.empty? && params[:referer_url].present? && params[:referer_url] != params[:url]
@artists = Artist.url_matches(params[:referer_url]).order("id desc").limit(20)
end
respond_with(@artists) do |format|
format.xml do
render :xml => @artists.to_xml(:include => [:urls], :root => "artists")