diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-21 05:55:18 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-21 05:55:18 -0600 |
commit | d156482b7919658817aeff261dfff160c8b25fa1 (patch) | |
tree | 6fb75c4e79d4f0e3c07b127285c9970b0e9e2484 /app | |
parent | fb17ed94be7f46061a654b738f20d68026ef6487 (diff) |
patch media model from glitch-soc
Diffstat (limited to 'app')
-rw-r--r-- | app/models/media_attachment.rb | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 361646f7d..0f0594e5d 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -44,7 +44,7 @@ class MediaAttachment < ApplicationRecord IMAGE_STYLES = { original: { - pixels: 16777216, # 4096x4096px + pixels: 16_777_216, # 4096x4096px file_geometry_parser: FastGeometryParser, }, @@ -55,23 +55,6 @@ class MediaAttachment < ApplicationRecord }, }.freeze - AUDIO_STYLES = { - original: { - format: 'mp4', - convert_options: { - output: { - filter_complex: '"[0:a]showwavespic=s=640x360:colors=lime|green,format=yuv420p[v]"', - map: '"[v]" -map 0:a', - threads: 2, - vcodec: 'libx264', - acodec: 'aac', - 'b:a': '256k', - movflags: '+faststart', - }, - }, - }, - }.freeze - VIDEO_STYLES = { small: { convert_options: { @@ -174,7 +157,7 @@ class MediaAttachment < ApplicationRecord end def needs_redownload? - (file.blank? || (Paperclip::Attachment.default_options[:storage] == :filesystem && !File.exist?(file.path))) && remote_url.present? + file.blank? && remote_url.present? end def larger_media_format? |