mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-19 03:41:04 +01:00
Merge branch 'main' into domain_permission_subscriptions
This commit is contained in:
commit
3e58c72b75
@ -113,6 +113,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch1() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
@ -254,6 +255,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch2() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
@ -395,6 +397,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch3() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
@ -587,6 +590,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch6() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
@ -750,6 +754,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch8() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
@ -932,6 +937,7 @@ func (suite *InstancePatchTestSuite) TestInstancePatch9() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
|
1
internal/cache/db.go
vendored
1
internal/cache/db.go
vendored
@ -1354,6 +1354,7 @@ func (c *Caches) initStatus() {
|
|||||||
s2.Mentions = nil
|
s2.Mentions = nil
|
||||||
s2.Emojis = nil
|
s2.Emojis = nil
|
||||||
s2.CreatedWithApplication = nil
|
s2.CreatedWithApplication = nil
|
||||||
|
s2.Edits = nil
|
||||||
|
|
||||||
return s2
|
return s2
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ func (s *Status) AllAttachmentIDs() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get count of attachment IDs.
|
// Get count of attachment IDs.
|
||||||
total += len(s.Attachments)
|
total += len(s.AttachmentIDs)
|
||||||
for _, edit := range s.Edits {
|
for _, edit := range s.Edits {
|
||||||
total += len(edit.AttachmentIDs)
|
total += len(edit.AttachmentIDs)
|
||||||
}
|
}
|
||||||
|
@ -377,12 +377,15 @@ func (res *result) GetFileType() (gtsmodel.FileType, string, string) {
|
|||||||
case "mp3":
|
case "mp3":
|
||||||
if len(res.audio) > 0 {
|
if len(res.audio) > 0 {
|
||||||
switch res.audio[0].codec {
|
switch res.audio[0].codec {
|
||||||
|
case "mp1":
|
||||||
|
return gtsmodel.FileTypeAudio,
|
||||||
|
"audio/mpeg", "mp1"
|
||||||
case "mp2":
|
case "mp2":
|
||||||
return gtsmodel.FileTypeAudio,
|
return gtsmodel.FileTypeAudio,
|
||||||
"audio/mp2", "mp2"
|
"audio/mpeg", "mp2"
|
||||||
case "mp3":
|
case "mp3":
|
||||||
return gtsmodel.FileTypeAudio,
|
return gtsmodel.FileTypeAudio,
|
||||||
"audio/mp3", "mp3"
|
"audio/mpeg", "mp3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "asf":
|
case "asf":
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
"audio/mp2", // .mp2
|
"audio/mp2", // .mp2
|
||||||
"audio/mp3", // .mp3
|
"audio/mp3", // .mp3
|
||||||
|
"audio/mpeg", // .mp1, .mp2, .mp3
|
||||||
|
|
||||||
"video/x-msvideo", // .avi
|
"video/x-msvideo", // .avi
|
||||||
|
|
||||||
|
@ -1960,6 +1960,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
@ -2105,6 +2106,7 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() {
|
|||||||
"image/webp",
|
"image/webp",
|
||||||
"audio/mp2",
|
"audio/mp2",
|
||||||
"audio/mp3",
|
"audio/mp3",
|
||||||
|
"audio/mpeg",
|
||||||
"video/x-msvideo",
|
"video/x-msvideo",
|
||||||
"audio/flac",
|
"audio/flac",
|
||||||
"audio/x-flac",
|
"audio/x-flac",
|
||||||
|
Loading…
Reference in New Issue
Block a user