internal/thumbs is internal/media, with Inspect: what a file holds, from ffprobe

The package was named for its first job; it now also decides what a file is for the
Files tab (image, video, audio) and reads its streams, which the viewer will need. Inspect
is the richer probe — codec, profile, pixel format, size, frame rate, HDR transfer, the
audio beside it, container and duration — run as root through sudo when asked.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-10-11 16:54:15 -07:00
co-authored by Claude Fable 5.1
parent beec9269fe
commit af189b1fa1
8 changed files with 174 additions and 32 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ import (
"time"
"hamlab/internal/priv"
"hamlab/internal/thumbs"
"hamlab/internal/media"
)
type Entry struct {
@@ -152,7 +152,7 @@ func entryOf(dir, name string, lst os.FileInfo) Entry {
e.Type = "other"
}
if e.Type == "file" || (e.Type == "link" && !e.Broken) {
e.Preview = thumbs.Kind(name)
e.Preview = media.Kind(name)
}
return e
}