Add a preview facet to the search message entity carrying the embedded preview
dimensions, mapped from the index in both engines. The webdav search report now
derives oc:has-preview via thumbnail.HasPreviewForMimeType: unconditional types
stay true, embedded-preview types (audio) are true only when a cover was
indexed, instead of the blanket mimetype match that reported a preview for every
audio file.
Add a shared helper that builds the thumbnails relationship from a resource's
info, gated on thumbnail.HasPreview so audio without embedded cover art no
longer advertises a preview that fails to render. Reported dimensions are
aspect-correct (fit into the box) rather than square, with a source thumbnail
carrying the native dimensions (audio cover from oc.preview, images from the
image facet). Wired into the drive children listings on $expand=thumbnails.
getPreview now prefers the embedded image tagged as the front cover
(dc:description "Cover (front)") and falls back to the first embedded image,
matching the thumbnailer's cover selection so the reported oc.preview
dimensions belong to the picture that actually gets rendered.
With embedded resources now surfaced by Tika (cover art via TIKA-4801), the
per-meta facet loop let an embedded image overwrite the container's facets:
audio files ended up with a bogus image facet (the cover's dimensions) and a
wiped audio facet. Take audio/image/photo/location facets from the container
entry only; embedded cover dimensions are captured as the preview instead.
For embedded-preview mime types (audio cover art), extract the embedded
cover's dimensions from Tika's recursive metadata (requires TIKA-4801) and
store them as oc.preview.width/height in the search index and arbitrary
metadata, routed through the shared facet-to-metadata flattening. Presence of
the dimensions is the preview-presence signal consumed by thumbnail.HasPreview.
Split SupportedMimeTypes into UnconditionalPreviewMimeTypes (preview follows
from the mimetype) and EmbeddedPreviewMimeTypes (audio cover art, may be
absent); SupportedMimeTypes stays as their union for the generator. Add
HasPreview(md) as the single source of truth: unconditional types are always
true, embedded types depend on stored oc.preview dimensions.
$expand=thumbnails was only honored by sharedByMe and sharedWithMe. The
driveItem stat, the children listing and the root children listing now
honor it as well, so a client that lists a folder learns which items have
a preview instead of guessing from the mime type.
The thumbnails are set from the resource info the listing already has, so
a later preview check that needs more than the mime type has a single
place to sit. The two share listings carry driveItems only, they keep
matching on the mime type but share the url building.
Instead of statically defining the version of Go in mise.toml as well as
in its native files (go.mod), use a small shell script to parse go.mod
and determine the version dynamically from there.
That version is then available as an env variable in the mise.toml file
and can be referenced for go, in order to avoid having to keep those
versions in sync, especially since dependabot will update go in the
go.mod file, but not in mise.toml.