Merge pull request #3889 from evazion/fix-replace-artist-finder

Cleanup artist finder
This commit is contained in:
Albert Yi
2018-09-12 11:44:42 -07:00
committed by GitHub
11 changed files with 19 additions and 96 deletions

View File

@@ -129,6 +129,8 @@ module Sources
normalize_for_artist_finder.present?
end
# The url to use for artist finding purposes. This will be stored in the
# artist entry. Normally this will be the profile url.
def normalize_for_artist_finder
profile_url || url
end
@@ -139,8 +141,7 @@ module Sources
end
def artists
url = profile_url.presence || image_url.presence
Artist.find_artists(url)
Artist.url_matches(normalize_for_artist_finder)
end
def file_url

View File

@@ -66,14 +66,6 @@ module Sources::Strategies
""
end
def artists
if profile_url.present?
Artist.find_artists(profile_url)
else
[]
end
end
def artist_name
return "" if api_response.blank?
api_response.attrs[:user][:screen_name]