From 3a49b3c54b714e82d77390039d406ccc38f6e31d Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 30 May 2017 12:01:07 -0700 Subject: [PATCH] include normalized artist url in artist json --- app/assets/javascripts/uploads.js | 2 +- app/logical/sources/site.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/uploads.js b/app/assets/javascripts/uploads.js index 9741399b1..24f34307e 100644 --- a/app/assets/javascripts/uploads.js +++ b/app/assets/javascripts/uploads.js @@ -98,7 +98,7 @@ var new_artist_href = "/artists/new?other_names=" + encodeURIComponent(data.artist_name) + "&urls=" - + encodeURIComponent([data.profile_url, data.image_url].join("\n")); + + encodeURIComponent($.unique([data.profile_url, data.normalized_for_artist_finder_url]).join("\n")); $("#source-record").html($("").attr("href", new_artist_href).text("Create New")); diff --git a/app/logical/sources/site.rb b/app/logical/sources/site.rb index be9c66592..2d18e8a79 100644 --- a/app/logical/sources/site.rb +++ b/app/logical/sources/site.rb @@ -62,6 +62,7 @@ module Sources :artist_name => artist_name, :profile_url => profile_url, :image_url => image_url, + :normalized_for_artist_finder_url => normalize_for_artist_finder!, :tags => tags, :translated_tags => translated_tags, :danbooru_name => artist_record.try(:first).try(:name),