moebooru: fix preview_urls to fallback to image_urls.

Fix the moebooru strategy to fallback to returning the image url if we
can't find the preview url. Fixes iqdb lookups failing in some cases
because the strategy didn't return a valid url for preview_url.
This commit is contained in:
evazion
2019-10-26 13:35:59 -05:00
parent ecfeaca7d4
commit a15bbe4264
2 changed files with 10 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ module Sources
end
def preview_urls
return [] unless post_md5.present?
return image_urls unless post_md5.present?
["https://#{file_host}/data/preview/#{post_md5[0..1]}/#{post_md5[2..3]}/#{post_md5}.jpg"]
end