files: video previews are made on the Transcode device too

The setting's device makes every video preview: on the file's own machine
when it is there (the hub tells it by header), else on the device's machine,
which reads the file through the hub by a one-file token, and the preview is
kept in the file's machine's own cache (PUT /api/files/thumb, refused if the
file changed). Images and covers stay on the file's machine's CPU. If the
device's machine can't, the file's makes it as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-10-23 16:07:00 -07:00
co-authored by Claude Opus 5.5
parent 1464e1f7a0
commit d5c16540a1
7 changed files with 335 additions and 12 deletions
+3
View File
@@ -225,6 +225,9 @@ func (s *Server) playPiece(w http.ResponseWriter, r *http.Request) {
// transcodeChoice is the setting; nil is the machine the file is on.
func (s *Server) transcodeChoice() *store.Transcode {
var t *store.Transcode
if s.store == nil {
return nil
}
s.store.View(func(st *store.State) {
if st.Transcode != nil {
c := *st.Transcode