Files
silo-server/internal/scanner
2fb5e10de4 fix(scanner): recover malformed video durations (#416)
* fix(scanner): recover malformed video durations

* fix(scanner): preserve probe failure semantics

* fix(scanner): harden malformed-duration recovery after review

Remediates the deep-review findings on the duration recovery machinery:

- Ignore attached_pic cover-art streams when deciding whether a file is
  video: audiobooks/music with embedded artwork no longer fail import or
  persist 1-second durations, and never trigger the packet scan.
- Cap the audio-only duration path (raised ceiling, not removed) so
  malformed audio containers cannot persist multi-year durations.
- Keep the parsed probe when the packet fallback fails instead of
  discarding codecs/tracks/resolution with a hard ProbeFile error.
- Apply the implausibly-short guard to the end-minus-start fallbacks so
  collapsed absolute-timestamp spans reach the packet scan too.
- Make the legacy-duration repair one-shot: rows reprobed by the fixed
  parser are authoritative, ending the infinite reprobe loop for
  genuinely short large clips.
- Teach the library-scan repair predicate (needsCriticalProbeRepairScanState)
  the same legacy signature so scans repair collapsed durations instead
  of deferring to request-time repair.
- Grant the packet-scan timeout to any reprobe likely to hit the
  fallback (Duration<=0 video files), not just the legacy shape.
- Share the implausibly-short thresholds between probe and repair layers
  (closes the 100-500MiB repair gap) and deduplicate frame-rate parsing
  within the scanner package.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: rxwatcher <rxwatcher@users.noreply.github.com>
Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 18:23:05 -04:00
..
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00