posts: fix placeholder thumbnail for Flash files.
* Replace the "Download" placeholder thumbnail for Flash files with a new placeholder that specifically says it's a Flash file. * Fix a bug where the Flash placeholder thumbnail was too small when using larger thumbnail sizes. * Fix it so that media assets don't falsely consider Flash files to have thumbnails. This could potentially cause errors if someone tried to expunge, replace, or regenerate a Flash post.
This commit is contained in:
@@ -162,6 +162,8 @@ class Post < ApplicationRecord
|
||||
end
|
||||
|
||||
def preview_file_url
|
||||
# XXX hack to return placeholder thumbnail for Flash files the /posts.json API.
|
||||
return Danbooru.config.storage_manager.file_url("/images/flash-preview.png") if media_asset.is_flash?
|
||||
media_asset.variant(:preview).file_url
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user