twitter: fix parsing of the artist name from the url.

Fixes URLs like https://twitter.com/intent/user?user_id=123 being
incorrectly normalized to http://twitter.com/intent/ in artist entries.

Also fixes the artist name to be taken from the url when it can't be
obtained from the api (when the tweet is deleted).
This commit is contained in:
evazion
2018-09-16 13:34:03 -05:00
parent 761f2649af
commit 325120ee51
4 changed files with 46 additions and 16 deletions

View File

@@ -132,7 +132,7 @@ module Sources
# 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
profile_url.presence || url
end
# A unique identifier for the artist. This is used for artist creation.