diff options
author | 2024-07-15 11:47:57 +0200 | |
---|---|---|
committer | 2024-07-15 10:47:57 +0100 | |
commit | 9efb11d8485f8273f7d64d46f2675a78fc41d6e8 (patch) | |
tree | c58847c1afc0d29110d06c8b6a7a24652f53dc6b /internal/media/processingmedia.go | |
parent | [chore]: Bump github.com/tdewolff/minify/v2 from 2.20.34 to 2.20.37 (#3106) (diff) | |
download | gotosocial-9efb11d8485f8273f7d64d46f2675a78fc41d6e8.tar.xz |
[feature/frontend] Add player for audio files; use thumbnail for `poster` (#3099)
* [feature/frontend] Audio player for audio media types
* use video preview images for previews instead of video itself
* don't preload
* update tests for new zork status
* collapse media gallery into single row when small
Diffstat (limited to 'internal/media/processingmedia.go')
-rw-r--r-- | internal/media/processingmedia.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/media/processingmedia.go b/internal/media/processingmedia.go index 43e153a4d..8ee242749 100644 --- a/internal/media/processingmedia.go +++ b/internal/media/processingmedia.go @@ -299,8 +299,14 @@ func (p *ProcessingMedia) store(ctx context.Context) error { // Extract image metadata from streams (if any), // this will only exist for embedded album art. - width, height, _ := result.ImageMeta() + width, height, framerate, _ := result.EmbeddedImageMeta() if width > 0 && height > 0 { + // Unlikely to need these but masto API includes them. + p.media.FileMeta.Original.Width = width + p.media.FileMeta.Original.Height = height + if framerate != 0 { + p.media.FileMeta.Original.Framerate = &framerate + } // Determine thumbnail dimensions to use. thumbWidth, thumbHeight := thumbSize(width, height) |