Vellum/internal
mithral 1b11867efe Phase 6a: directory grouping, audiobooks and music playback
A book is a folder of chapters, not a file. The scanner gained a grouping
mode so a directory of tracks becomes one item with ordered files.

- registry: MediaType.Group (file | directory). Audiobooks and music group by
  directory; everything else stays one item per file.
- scanner: builds groups, upserts one item per group, marks items missing when
  their directory disappears, and keeps the file-level added/updated/missing
  accounting. Tracks are ordered naturally, so chapter 2 precedes chapter 10.
- natsort: one shared natural-order comparator, now used by both the scanner
  and the comics module (which had its own copy).
- media: GET /items/{id}/files/{fileID} streams one specific track. It
  verifies the file belongs to the item, so an item id cannot be paired with
  another item's file id.

No new module was needed for playback: the polymorphic progress table already
keys on file_id, so per-chapter resume fell out of the existing design. The
web player resumes the exact track and offset.

Verified: 3 chapters grouped into one book titled "Mistborn", natural order,
range request returned 206, mismatched file id 404s, per-track progress
round-trips.
2026-10-09 21:20:47 -04:00
..
auth Phase 1: accounts, sessions, per-library grants 2026-10-09 16:31:24 -04:00
core Phase 5: job queue and metadata providers 2026-10-09 21:16:07 -04:00
httpapi Web UI: Svelte app, embedded into the binary 2026-10-09 16:40:58 -04:00
httpx Phase 1: accounts, sessions, per-library grants 2026-10-09 16:31:24 -04:00
jobs Phase 5: job queue and metadata providers 2026-10-09 21:16:07 -04:00
library Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
media Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
metadata Phase 5: job queue and metadata providers 2026-10-09 21:16:07 -04:00
modules Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
natsort Phase 6a: directory grouping, audiobooks and music playback 2026-10-09 21:20:47 -04:00
progress Phase 3: EPUB module, file streaming, per-user progress 2026-10-09 16:36:27 -04:00
search Phase 2b: FTS5 search 2026-10-09 21:10:44 -04:00
stream Phase 3: EPUB module, file streaming, per-user progress 2026-10-09 16:36:27 -04:00