add ugoira support in view

This commit is contained in:
r888888888
2014-10-16 14:25:05 -07:00
parent 3bb06c2be4
commit 4c73fb9f79
10 changed files with 69 additions and 8 deletions

View File

@@ -1,12 +1,12 @@
class PixivUgoiraService
attr_reader :width, :height, :frame_data
attr_reader :width, :height, :frame_data, :content_type
def process(post)
save_frame_data(post)
end
def save_frame_data(post)
PixivUgoiraFrameData.create(:data => @frame_data, :post_id => post.id)
PixivUgoiraFrameData.create(:data => @frame_data, :content_type => @content_type, :post_id => post.id)
end
def generate_resizes(source_path, output_path, preview_path)
@@ -17,5 +17,6 @@ class PixivUgoiraService
@frame_data = data[:ugoira_frame_data]
@width = data[:ugoira_width]
@height = data[:ugoira_height]
@content_type = data[:ugoira_content_type]
end
end