fixes for ugoira convert
This commit is contained in:
@@ -10,7 +10,7 @@ class PixivUgoiraService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def generate_resizes(source_path, output_path, preview_path)
|
def generate_resizes(source_path, output_path, preview_path)
|
||||||
PixivUgoiraConverter.new.delay(:queue => Socket.gethostname).convert(source_path, output_path, preview_path, @frame_data)
|
PixivUgoiraConverter.delay(:queue => Socket.gethostname).convert(source_path, output_path, preview_path, @frame_data)
|
||||||
|
|
||||||
# since the resizes will be delayed, just touch the output file so the
|
# since the resizes will be delayed, just touch the output file so the
|
||||||
# file distribution wont break
|
# file distribution wont break
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ class Upload < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
generate_resizes(file_path)
|
generate_resizes(file_path)
|
||||||
move_file
|
move_file
|
||||||
|
save
|
||||||
post = convert_to_post
|
post = convert_to_post
|
||||||
post.distribute_files
|
post.distribute_files
|
||||||
if post.save
|
if post.save
|
||||||
@@ -148,7 +149,7 @@ class Upload < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def async_conversion?
|
def async_conversion?
|
||||||
is_ugoira?
|
has_ugoira_tag?
|
||||||
end
|
end
|
||||||
|
|
||||||
def ugoira_service
|
def ugoira_service
|
||||||
|
|||||||
Reference in New Issue
Block a user