diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-06-26 13:02:14 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-06-26 13:02:14 +0200 |
commit | a01674fb2b4eb210b300b380899d388b0807999a (patch) | |
tree | d497e4b75d85ad5e8dd29416775730d29e13f79d /app/workers | |
parent | 8f4aff9b6fe638b26b9d0bf0fe4151c2cc214d6d (diff) | |
parent | 08cf81f8c1b445eba9972214869c376fe6097efb (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/post_process_media_worker.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/workers/post_process_media_worker.rb b/app/workers/post_process_media_worker.rb index 148ae5e2b..73f9ae2bf 100644 --- a/app/workers/post_process_media_worker.rb +++ b/app/workers/post_process_media_worker.rb @@ -25,8 +25,14 @@ class PostProcessMediaWorker media_attachment = MediaAttachment.find(media_attachment_id) media_attachment.processing = :in_progress media_attachment.save + + # Because paperclip-av-transcover overwrites this attribute + # we will save it here and restore it after reprocess is done + previous_meta = media_attachment.file_meta + media_attachment.file.reprocess!(:original) media_attachment.processing = :complete + media_attachment.file_meta = previous_meta media_attachment.save rescue ActiveRecord::RecordNotFound true |