From 368c97f0f85f243796a0407960dc5a2ccad24bab Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:10:41 +0000 Subject: [bugfix] take into account rotation when generating thumbnail (#3147) * take into account rotation when generating thumbnail, simplify ffprobe output to show only fields we need * only show rotation side data * remove unnecessary comment * fix code comments * remove debug logging --- internal/media/manager_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/media/manager_test.go') diff --git a/internal/media/manager_test.go b/internal/media/manager_test.go index 26b103908..68de74dd6 100644 --- a/internal/media/manager_test.go +++ b/internal/media/manager_test.go @@ -483,7 +483,7 @@ func (suite *ManagerTestSuite) TestLongerMp4Process() { suite.EqualValues(float32(10), *attachment.FileMeta.Original.Framerate) suite.EqualValues(0xce3a, *attachment.FileMeta.Original.Bitrate) suite.EqualValues(gtsmodel.Small{ - Width: 512, Height: 281, Size: 143872, Aspect: 1.822064, + Width: 512, Height: 281, Size: 143872, Aspect: 1.8181819, }, attachment.FileMeta.Small) suite.Equal("video/mp4", attachment.File.ContentType) suite.Equal("image/webp", attachment.Thumbnail.ContentType) @@ -543,7 +543,7 @@ func (suite *ManagerTestSuite) TestBirdnestMp4Process() { suite.EqualValues(float32(30), *attachment.FileMeta.Original.Framerate) suite.EqualValues(0x11844c, *attachment.FileMeta.Original.Bitrate) suite.EqualValues(gtsmodel.Small{ - Width: 287, Height: 512, Size: 146944, Aspect: 0.5605469, + Width: 287, Height: 512, Size: 146944, Aspect: 0.5611111, }, attachment.FileMeta.Small) suite.Equal("video/mp4", attachment.File.ContentType) suite.Equal("image/webp", attachment.Thumbnail.ContentType) -- cgit v1.2.3