- HLS keyframe index: gomedia.KeyframeTimes / KeyframeTimesWithin read the
first video stream's keyframes from the MP4/MOV/M4V stss/stts/ctts tables
or Matroska/WebM Cues/block headers (go-media media.KeyframeTimes), with
go-ffmpeg's 1 ms dedupe and a dev-mode shadow diff against ffprobe.
probeKeyframesCached tries go-media first and falls back to the existing
ffprobe pre-flight. A go-media timeline with a gap past the copy cap is
confirmed by ffprobe before transcoding is forced, because go-media can
only miss keyframes (parser-flagged IDRs, partial Cues), never add them.
- HEIC/AVIF rotation: ffmpeg.CorrectHEICJPEGOrientation gets the display
rotation from go-media's HEIFTransform (installed by gomedia as
ffmpeg.SetHEICDisplayRotationReader). The "ffmpeg -f null" stderr probe
only runs when go-media is off or cannot read the item properties.
- Containers: AVIF routes through the HEIC preview path and heifImageExts.
ASF/WMV thumbnails go to go-media (WMV3); WMV1/WMV2 fall back to ffmpeg.
AVI, TS/M2TS/MTS and MPEG-PS/VOB stay on ffmpeg (go-media's probe does
not match ffprobe yet; documented in videoContainerExts). Stale comments
in gomedia.go and preview/video.go are fixed.
- Shared cache: new internal/mediacache replaces ffmpeg's MediaCache,
SubtitleContentCache and MetadataCache and gomedia's probe and subtitle
caches. Probe, duration, subtitle list and subtitle content are keyed by
path, size and mtime (ns) and shared by both backends. ffmpeg ProbeFile
results are now cached too. Shadow runs use mediacache.WithoutCache so
they compare fresh ffmpeg output; toggling "Always use ffmpeg" clears it.
FTS5 speeds up substring searches but costs roughly 40% more indexing
time and 15% more index file size, so it now defaults to off.
- Add indexSqlConfig.fts5 (default false). When off, search uses the
existing unindexed query and no FTS table or triggers are created.
- When enabled, the index is built from existing rows on startup (no
rescan); disabling it drops the table and triggers.
- Regenerate config.yaml and swagger docs.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Review follow-up on #3108.
- There is no integrations.wopi block any more: integrations.office gains
product (onlyoffice, the default, or collabora) and tokenExpirationHours.
secret stays required for OnlyOffice and becomes optional for Collabora.
Existing OnlyOffice configs are unchanged. With product collabora, the
OnlyOffice-specific paths (document keys, previews via /converter, CSP
script origins, onlyOfficeUrl) stand down.
- The SPA receives officeProduct and officeExtensions instead of the wopi*
globals. WOPI stays the name of the protocol code and routes.
- Discovery is refreshed in the background until shutdown: every 30s while
it has never loaded (the editor often starts after FileBrowser), then every
10 minutes. Before, a failed first fetch left Collabora disabled until
restart.
- WopiEditor shows its close button when the session request fails, instead
of leaving the user on a blank view.
- Fix the router import broken by the upstream switch to a named export.
FileBrowser gains a WOPI host, so office documents can open in Collabora
Online (or any WOPI editor, OnlyOffice Docs included) next to the existing
OnlyOffice integration. Refs #641.
- integrations.wopi: url, internalUrl, secret, product, tokenExpirationHours,
viewOnly. Discovery is fetched from the editor and cached; extensions it
declares open in the editor, except formats FileBrowser already views
itself (images, plain text).
- GET /api/wopi/session returns the editor URL and a signed access token
bound to one file, one user and a mode. The token has its own audience and
a key derived from the auth key (or integrations.wopi.secret), so it never
doubles as a session token.
- /wopi/files/{id}[/contents]: CheckFileInfo, GetFile, PutFile and the lock
operations. Permissions are re-checked on every call, so revoking access
takes effect mid-session. PutFile receives the whole body before writing,
and answers Collabora's COOLStatusCode 1010 when the file changed in
storage since it was loaded, letting the user overwrite or reload.
- access_token is redacted from request logs.
- WopiEditor.vue form-posts the token into an iframe and handles UI_Close.
Public shares keep using OnlyOffice for now.