Repository navigation
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 50 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
5748d3c to
8d0b8ed
Compare
72d4dcb to
3027a39
Compare
| const ( | ||
| PreviewWidthKey = "oc.preview.width" | ||
| PreviewHeightKey = "oc.preview.height" | ||
| ) |
There was a problem hiding this comment.
I would prefer a single oc.preview property with 200x300 as the dimension. While we do cache the properties in nats, I think splitting by x is more efficient.
There was a problem hiding this comment.
I'm not the biggest fan tbh.
Would need concatenation on the indexing site and parsing on the consuming side, while making querying for it more awkward and require special handling.
I could imagine for my music server it could be nice for some views to query only files with specific (minimal) preview sizes e.g.
If you insist, we can do it.. but I'd prefer not to
|
Hm ...
🤔 You mean you need them to be created when indexing (after postprocessing), so they are available during dirlistings? |
Basically, yes - I need the dimensions in ArbitraryMetadata during listings and in the index during search, so I can fill the thumbnails relationship. |
9de577a to
3bf02cf
Compare
6a65302 to
a943a1c
Compare
a943a1c to
6161356
Compare
There was a problem hiding this comment.
This can be solved more elegantly with the approach in #3332 but this is good enough for an interim step
1efe7a7 to
e885a92
Compare
f9e9f67 to
fc5835f
Compare
fc5835f to
423df6c
Compare
423df6c to
d5255a8
Compare
d5255a8 to
cf223d0
Compare
Unconditional types follow from the mimetype, embedded ones (audio cover art) need indexed oc.preview dimensions.
Prefers the front cover. Adds the preview field to the search entity.
oc.preview now carries the cover's own content type next to its dimensions, so webdav knows before it builds the cache key what a thumbnail of it is written in: a png cover stays a png instead of being re-encoded to the jpeg the container's type maps to.
A file that carries its preview inside is only previewable once the extraction has seen it: dimensions and the type it is in. Without that nothing here could say what a thumbnail would be, so the mapping no longer pins audio to jpeg and the workflow refuses instead of guessing.
Makes preview availability honest instead of a blanket mimetype match, and bases the driveItem thumbnails on it.
HasPreviewas the single source of truth (unconditional types follow from the mimetype, an audio cover depends on what the index saw). Both live inservices/webdav/pkg/thumbnailnow, where webdav owns the type list since Push based thumbnailer architecture #3397.oc.preview(preferring the front cover).oc.preview.contentTypewhen it stats the file, so the output type is settled before the cache key is built and a png cover stays a png. Nothing is derived from the image bytes, and the cache keeps its interface.oc:has-previewfor audio in search results (newpreviewfield on the search message entity).$expand=thumbnails) are gated onHasPreviewand gain asourcethumbnail requested at the original size. No thumbnail carries dimensions: the served size snaps to the configured resolution set, not knowable at listing time.Stacked on #3332, which is what closes the gap this PR used to carry: the preview metadata and the rendered preview now come from the same extraction, so they cannot describe different pictures. What is indexed is what gets rendered.
Removing a cover does not clear an already indexed
oc.previewyet. The stale facet cleanup in #3682 only covers thelibre.graph.prefix, so whichever of the two merges last has to addoc.preview.to its stale check.Follow-ups (kept out to stay focused): consolidate the shared-view thumbnail blocks via a generic
odataexpand-set, and switch reva propfind has-preview tothumbnail.HasPreview.Note
Even once this PR and #3211 (graph search query endpoint) are both merged, hits from
POST /graph/v1beta1/search/querystill won't carry thumbnails: the$expand=thumbnailswiring for search hits builds on both PRs and currently only exists on the consolidation branch (dschmidt/opencloud@feat/graph-search-full-2, commit0d94199a:searchEntityThumbnailSetinsearchquery.go, preview presence viathumbnail.HasPreviewForMimeType+ indexedoc.preview/image-facet dimensions). It needs a follow-up PR once both are in.