From 7bd2b54a468163ebc67802ae53dcf88aa4bf727f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 10 May 2021 22:23:48 +0200 Subject: Bump version to 3.4.0rc2 (#16206) --- lib/mastodon/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 0a0a7878b..a8d7a8f95 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 -- cgit From 5ed5f62705a0d9dd58f4eb617445683ee8bd2378 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Wed, 12 May 2021 02:15:11 +0900 Subject: Fix animated GIF generates animated thumbnail (#16216) --- lib/paperclip/gif_transcoder.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit