feat(library): extract track duration via ffprobe #13

Merged
bvandeusen merged 262 commits from dev into main 2026-04-20 08:11:10 -04:00
bvandeusen commented 2026-04-20 08:05:22 -04:00 (Migrated from git.fabledsword.com)

Summary

  • Shell out to ffprobe (already in the container image) during scan to populate duration_ms per track. Without this, scrubbing/seeking in clients is a no-op because every track is reported as 0ms.
  • ffprobe failures log a warning and record duration_ms=0 so a single bad file doesn't sink the whole scan.
  • Tighten the incremental skip to also require duration_ms > 0, so existing libraries scanned before this change get backfilled on the next rescan rather than requiring a wipe.

Test plan

  • go build ./...
  • go test -short ./internal/library/...
  • Rebuild image, rescan, confirm tracks now report nonzero duration and clients can scrub
## Summary - Shell out to `ffprobe` (already in the container image) during scan to populate `duration_ms` per track. Without this, scrubbing/seeking in clients is a no-op because every track is reported as 0ms. - ffprobe failures log a warning and record `duration_ms=0` so a single bad file doesn't sink the whole scan. - Tighten the incremental skip to also require `duration_ms > 0`, so existing libraries scanned before this change get backfilled on the next rescan rather than requiring a wipe. ## Test plan - [x] `go build ./...` - [x] `go test -short ./internal/library/...` - [ ] Rebuild image, rescan, confirm tracks now report nonzero duration and clients can scrub
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#13