forked from e621ng/e621ng
fixes #3742
This commit is contained in:
parent
65cc1def92
commit
b561a6d9ab
@ -7,7 +7,7 @@ class PixivUgoiraFrameData < ApplicationRecord
|
||||
|
||||
if data[0]["delay_msec"]
|
||||
self.data = data.map.with_index do |datum, i|
|
||||
filename = "%06d.jpg" % [i + 1]
|
||||
filename = "%06d.jpg" % [i]
|
||||
{"delay" => datum["delay_msec"], "file" => filename}
|
||||
end
|
||||
end
|
||||
|
@ -161,6 +161,18 @@ class Post < ApplicationRecord
|
||||
storage_manager.file_url(self, :preview)
|
||||
end
|
||||
|
||||
def file_path
|
||||
storage_manager.file_path(md5, file_ext, :original)
|
||||
end
|
||||
|
||||
def large_file_path
|
||||
storage_manager.file_path(md5, file_ext, :large)
|
||||
end
|
||||
|
||||
def preview_file_path
|
||||
storage_manager.file_path(md5, file_ext, :preview)
|
||||
end
|
||||
|
||||
def open_graph_image_url
|
||||
if is_image?
|
||||
if has_large?
|
||||
|
Loading…
Reference in New Issue
Block a user