about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-05-12 11:39:55 +0200
committerGitHub <noreply@github.com>2021-05-12 11:39:55 +0200
commitdb2f6fa49b1a704c66be3f0ea04a440cde80cf50 (patch)
tree705571dd7a856c57f23dfd02917c115a887ca525 /lib
parentffc3f8eebe134ca9b18af73aa29eaa1627082e40 (diff)
parent671a95c545bf7b47d74e1021b76d17bbf44cc5cc (diff)
Merge pull request #1535 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/version.rb2
-rw-r--r--lib/paperclip/gif_transcoder.rb10
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb
index f92a350ca..6a79453f1 100644
--- a/lib/mastodon/version.rb
+++ b/lib/mastodon/version.rb
@@ -17,7 +17,7 @@ module Mastodon
     end
 
     def flags
-      'rc1'
+      'rc2'
     end
 
     def suffix
diff --git a/lib/paperclip/gif_transcoder.rb b/lib/paperclip/gif_transcoder.rb
index 74aa1a0b2..d14465c01 100644
--- a/lib/paperclip/gif_transcoder.rb
+++ b/lib/paperclip/gif_transcoder.rb
@@ -108,9 +108,11 @@ module Paperclip
 
       final_file = Paperclip::Transcoder.make(file, options, attachment)
 
-      attachment.instance.file_file_name    = File.basename(attachment.instance.file_file_name, '.*') + '.mp4'
-      attachment.instance.file_content_type = 'video/mp4'
-      attachment.instance.type              = MediaAttachment.types[:gifv]
+      if options[:style] == :original
+        attachment.instance.file_file_name    = File.basename(attachment.instance.file_file_name, '.*') + '.mp4'
+        attachment.instance.file_content_type = 'video/mp4'
+        attachment.instance.type              = MediaAttachment.types[:gifv]
+      end
 
       final_file
     end
@@ -118,7 +120,7 @@ module Paperclip
     private
 
     def needs_convert?
-      options[:style] == :original && GifReader.animated?(file.path)
+      GifReader.animated?(file.path)
     end
   end
 end