Merge pull request #3373 from evazion/fix-3368

Fix #3368: "Fetch source data" on /uploads/new doesn't fetch artist tag
This commit is contained in:
Albert Yi
2017-11-15 10:58:52 -08:00
committed by GitHub
10 changed files with 83 additions and 105 deletions

View File

@@ -101,14 +101,7 @@ class ArtistsController < ApplicationController
end
def finder
begin
@artists = Artist.url_matches(params[:url]).order("id desc").limit(10)
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
rescue PixivApiClient::Error => e
@artists = []
end
@artists = Artist.find_artists(params[:url], params[:referer_url])
respond_with(@artists) do |format|
format.xml do