From 9efb11d8485f8273f7d64d46f2675a78fc41d6e8 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:47:57 +0200 Subject: [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 --- internal/api/model/attachment.go | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'internal/api/model/attachment.go') diff --git a/internal/api/model/attachment.go b/internal/api/model/attachment.go index 7e81759f2..d0b0c81e5 100644 --- a/internal/api/model/attachment.go +++ b/internal/api/model/attachment.go @@ -90,12 +90,23 @@ type Attachment struct { // A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet. // See https://github.com/woltapp/blurhash Blurhash *string `json:"blurhash"` +} + +// WebAttachment is like Attachment, but with +// additional fields not exposed via JSON; +// used only internally for templating etc. +// +// swagger:ignore +type WebAttachment struct { + *Attachment - // Additional fields not exposed via JSON - // (used only internally for templating etc). + // Parent status of this + // media is sensitive. + Sensitive bool - // Parent status of this media is sensitive. - Sensitive bool `json:"-"` + // MIME type of + // the attachment. + MIMEType string } // MediaMeta models media metadata. -- cgit v1.2.3