From de45c0be60e453e69263f5b32ab2ce2661dc74ca Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:24:53 +0000 Subject: [feature] more filetype support! (#3107) * add more supported file types to our media processor that ffmpeg supports, update supported mime type lists * add code comments to the supported mime types slice * don't check for zero value string, just parse * remove some unneeded consts which make the code a bit harder to read * fix test expected instance media mime types, use compact ffprobe json, simple media processing by type * final tweaks to media processing code * don't use safe divide where we don't need to --- internal/typeutils/internaltofrontend_test.go | 34 +++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'internal/typeutils/internaltofrontend_test.go') diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index 6429df4fa..c4da0d57c 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -1225,9 +1225,22 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() { "supported_mime_types": [ "image/jpeg", "image/gif", - "image/png", "image/webp", - "video/mp4" + "audio/mp2", + "audio/mp3", + "video/x-msvideo", + "image/png", + "image/apng", + "audio/ogg", + "video/ogg", + "audio/x-m4a", + "video/mp4", + "video/quicktime", + "audio/x-ms-wma", + "video/x-ms-wmv", + "video/webm", + "audio/x-matroska", + "video/x-matroska" ], "image_size_limit": 41943040, "image_matrix_limit": 16777216, @@ -1350,9 +1363,22 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() { "supported_mime_types": [ "image/jpeg", "image/gif", - "image/png", "image/webp", - "video/mp4" + "audio/mp2", + "audio/mp3", + "video/x-msvideo", + "image/png", + "image/apng", + "audio/ogg", + "video/ogg", + "audio/x-m4a", + "video/mp4", + "video/quicktime", + "audio/x-ms-wma", + "video/x-ms-wmv", + "video/webm", + "audio/x-matroska", + "video/x-matroska" ], "image_size_limit": 41943040, "image_matrix_limit": 16777216, -- cgit v1.2.3