fixes webms not working after uploading an mp4 file (for originals)

This commit is contained in:
edshot99 2024-11-08 21:32:56 -06:00
parent 10023a5585
commit 9ee8f13d5f

View File

@ -37,7 +37,8 @@ class PostVideoConversionJob < ApplicationJob
sm.store(named_samples[1], mp4_path)
named_samples[1].close!
end
sm.store(samples[:original][1], sm.file_path(md5, post.is_webm? ? "mp4" : "webm", :original, post.is_deleted?))
sm.store(samples[:original][1], sm.file_path(md5, "mp4", :original, post.is_deleted?)) if post.is_webm?
sm.store(samples[:original][0], sm.file_path(md5, "webm", :original, post.is_deleted?)) unless post.is_webm?
samples[:original].each(&:close!)
end