nijie: fix uploads not working for new image URL format.

Fix uploads not working for image URLs like this:

    https://pic.nijie.net/07/nijie/17/95/728995/illust/0_0_403fdd541191110c_c25585.jpg
This commit is contained in:
evazion
2022-02-15 20:16:49 -06:00
parent a14cd3cd8b
commit 9a5a04d74e
3 changed files with 3 additions and 7 deletions

View File

@@ -102,7 +102,7 @@ module Sources
# Can't use URI.join here because nijie urls may contain japanese characters
images = images.map { |img| "https:#{img}" }
images = [url] if url.match?(IMAGE_URL) && images.empty?
images = [url] if images.empty?
images.map(&method(:to_full_image_url)).uniq
end