diff options
author | 2024-07-15 14:24:53 +0000 | |
---|---|---|
committer | 2024-07-15 15:24:53 +0100 | |
commit | de45c0be60e453e69263f5b32ab2ce2661dc74ca (patch) | |
tree | dd3c2196ea3a4dad5cd750d7310b801f05b95520 /internal/api/client/instance/instancepatch_test.go | |
parent | [feature/frontend] Add player for audio files; use thumbnail for `poster` (#3... (diff) | |
download | gotosocial-de45c0be60e453e69263f5b32ab2ce2661dc74ca.tar.xz |
[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
Diffstat (limited to 'internal/api/client/instance/instancepatch_test.go')
-rw-r--r-- | internal/api/client/instance/instancepatch_test.go | 102 |
1 files changed, 90 insertions, 12 deletions
diff --git a/internal/api/client/instance/instancepatch_test.go b/internal/api/client/instance/instancepatch_test.go index 5113e4c57..42833c23e 100644 --- a/internal/api/client/instance/instancepatch_test.go +++ b/internal/api/client/instance/instancepatch_test.go @@ -105,9 +105,22 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() { "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, @@ -226,9 +239,22 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() { "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, @@ -347,9 +373,22 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() { "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, @@ -519,9 +558,22 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() { "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, @@ -662,9 +714,22 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() { "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, @@ -820,9 +885,22 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() { "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, |