sources: simplify artist finder url normalization.
Get rid of `normalized_for_artist_finder?` and `normalizable_for_artist_finder?`. This was legacy bullshit that was originally designed to avoid API calls when saving artist entries containing old Pixiv direct image urls that had already been normalized, or that couldn't be normalized because they were bad id. Nowadays we store profile urls in artist entries instead of direct image urls, so we don't normally need to do any API calls to normalize the profile url. Strategies should take care to avoid triggering API calls inside `profile_url` when possible.
This commit is contained in:
@@ -13,18 +13,6 @@ module Sources
|
||||
image_url
|
||||
end
|
||||
|
||||
def normalized_for_artist_finder?
|
||||
true
|
||||
end
|
||||
|
||||
def normalizable_for_artist_finder?
|
||||
false
|
||||
end
|
||||
|
||||
def normalize_for_artist_finder
|
||||
url
|
||||
end
|
||||
|
||||
def normalize_for_source
|
||||
case url
|
||||
when %r{\Ahttps?://(?:d3j5vwomefv46c|dn3pm25xmtlyu)\.cloudfront\.net/photos/large/(\d+)\.}i
|
||||
|
||||
Reference in New Issue
Block a user