summaryrefslogtreecommitdiff
path: root/internal/media/processingmedia.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-07-15 11:47:57 +0200
committerLibravatar GitHub <noreply@github.com>2024-07-15 10:47:57 +0100
commit9efb11d8485f8273f7d64d46f2675a78fc41d6e8 (patch)
treec58847c1afc0d29110d06c8b6a7a24652f53dc6b /internal/media/processingmedia.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.20.34 to 2.20.37 (#3106) (diff)
downloadgotosocial-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.go8
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)