diff options
author | 2022-12-22 11:48:28 +0100 | |
---|---|---|
committer | 2022-12-22 11:48:28 +0100 | |
commit | 1659f75ae6e491355e1d32f0f5e8b956ef70a797 (patch) | |
tree | 0cc7aba9d8c98ee0163488121328e9cd0c6b32c2 /internal/typeutils/converter_test.go | |
parent | [bugfix] fix media create error not being checked (#1283) (diff) | |
download | gotosocial-1659f75ae6e491355e1d32f0f5e8b956ef70a797.tar.xz |
[feature] For video attachments, store + return fps, bitrate, duration (#1282)
* start messing about with different mp4 metadata extraction
* heyyooo it works
* add test cow
* move useful multierror to gtserror package
* error out if video doesn't seem to be a real mp4
* test parsing mkv in disguise as mp4
* tidy up error handling
* remove extraneous line
* update framerate formatting
* use float32 for aspect
* fixy mctesterson
Diffstat (limited to 'internal/typeutils/converter_test.go')
-rw-r--r-- | internal/typeutils/converter_test.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/internal/typeutils/converter_test.go b/internal/typeutils/converter_test.go index f56afcd9d..225df2cf1 100644 --- a/internal/typeutils/converter_test.go +++ b/internal/typeutils/converter_test.go @@ -469,11 +469,12 @@ const ( type TypeUtilsTestSuite struct { suite.Suite - db db.DB - testAccounts map[string]*gtsmodel.Account - testStatuses map[string]*gtsmodel.Status - testPeople map[string]vocab.ActivityStreamsPerson - testEmojis map[string]*gtsmodel.Emoji + db db.DB + testAccounts map[string]*gtsmodel.Account + testStatuses map[string]*gtsmodel.Status + testAttachments map[string]*gtsmodel.MediaAttachment + testPeople map[string]vocab.ActivityStreamsPerson + testEmojis map[string]*gtsmodel.Emoji typeconverter typeutils.TypeConverter } @@ -485,6 +486,7 @@ func (suite *TypeUtilsTestSuite) SetupSuite() { suite.db = testrig.NewTestDB() suite.testAccounts = testrig.NewTestAccounts() suite.testStatuses = testrig.NewTestStatuses() + suite.testAttachments = testrig.NewTestAttachments() suite.testPeople = testrig.NewTestFediPeople() suite.testEmojis = testrig.NewTestEmojis() suite.typeconverter = typeutils.NewConverter(suite.db) |