Merge branch 'main' into push-notifications

This commit is contained in:
Vyr Cossont 2024-12-28 14:31:47 -08:00
commit 6ed26e0a93
4 changed files with 16 additions and 4 deletions

View file

@ -113,6 +113,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",
@ -254,6 +255,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",
@ -395,6 +397,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",
@ -587,6 +590,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",
@ -750,6 +754,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",
@ -932,6 +937,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",

View file

@ -377,12 +377,15 @@ func (res *result) GetFileType() (gtsmodel.FileType, string, string) {
case "mp3":
if len(res.audio) > 0 {
switch res.audio[0].codec {
case "mp1":
return gtsmodel.FileTypeAudio,
"audio/mpeg", "mp1"
case "mp2":
return gtsmodel.FileTypeAudio,
"audio/mp2", "mp2"
"audio/mpeg", "mp2"
case "mp3":
return gtsmodel.FileTypeAudio,
"audio/mp3", "mp3"
"audio/mpeg", "mp3"
}
}
case "asf":

View file

@ -39,8 +39,9 @@
"image/gif", // .gif
"image/webp", // .webp
"audio/mp2", // .mp2
"audio/mp3", // .mp3
"audio/mp2", // .mp2
"audio/mp3", // .mp3
"audio/mpeg", // .mp1, .mp2, .mp3
"video/x-msvideo", // .avi

View file

@ -1961,6 +1961,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",
@ -2113,6 +2114,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() {
"image/webp",
"audio/mp2",
"audio/mp3",
"audio/mpeg",
"video/x-msvideo",
"audio/flac",
"audio/x-flac",