about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/media_attachment.rb21
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?