moebooru: support batch bookmarklet previews (#3911).

This commit is contained in:
evazion
2018-10-06 00:58:22 -05:00
parent fdb6e4ecee
commit e5a4193dd4
2 changed files with 16 additions and 5 deletions

View File

@@ -59,6 +59,11 @@ module Sources
[image_url]
end
def preview_urls
return [] unless post_md5.present?
["https://#{file_host}/data/preview/#{post_md5[0..1]}/#{post_md5[2..3]}/#{post_md5}.jpg"]
end
def page_url
return nil if post_id.blank?
"https://#{site_name}/post/show/#{post_id}"