Merge branch 'master' into glitch-soc/merge-upstream

This commit is contained in:
Thibaut Girka
2020-06-26 13:02:14 +02:00
52 changed files with 650 additions and 394 deletions

View File

@@ -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