Repository navigation
fix(scanner): keep multi-file audiobook chapters after playback - #3168
Conversation
…e repair The audiobook scanner gives each part of a multi-file book one chapter named after the file. Those rows store no audio tracks, so the first playback runs the critical probe repair, which replaced the chapters with the reprobe's (none for an mp3) and wiped the book's chapter list. The repair now keeps existing chapters when the reprobe finds none and none of them came from the container. A multipart part with no chapters is no longer treated as unchanged, so the next scan restores books already affected.
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 24 minutes. View limit details
Comment |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The linked evidence is described as audiobook detail-page captures after playback, but it does not identify evidence for these additional visible effects:
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
The
Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
|
Not adding player captures. The player's chapter list comes from the same chapter rows as the detail page, and the evidence page shows those rows kept after playback. The rescan recovery path writes the same rows; its test covers a multipart book with missing chapters. |
|
Reviewed head Fit: 10/10 · Readiness: 9/10 — ready. This restores documented audiobook chapter behavior at the persistence boundary. The recovery check converges after a successful rescan, and the repair still follows embedded chapter metadata. The changed regression cases demonstrate both fixes; CI is green and the branch is mergeable. Verification:
Validated features: re-check #1254 C1, the shared scan path in #1255 C3, and chapter navigation in #1256 C8, Silo-Server/silo-apple#339 C8, Silo-Server/silo-apple#340 C8, Silo-Server/silo-android#349 C8, and Silo-Server/silo-android#350 C8. The October 27 comments report integration testing on Compatibility and manual: the API shape and chapter source values stay the same. Web, Apple, Android, and Audiobookshelf readers use the restored rows; no client patch is required. Jellyfin excludes audiobooks. The current audiobook library and listening guides already describe one chapter per multipart file and chapter navigation, so this fix needs no manual issue. The review covered the full diff, callers, persistence, failure paths, contracts, and rescan convergence, with three Codex finder passes, a validation pass, a final sweep, and one independent Claude Opus 5.5 round. Neither provider found a verified defect introduced by this PR. No code changes were needed. Note AI disclosure: gpt-6.1-sol in T3 Code using the Codex provider. The main review used xhigh effort; the Codex review agents used high effort. The independent second opinion used claude-opus-5-5 at high effort through T3 Code's Claude provider. Tools: GitHub CLI, Git, Go, and the Silo review and validation helpers. This is an AI-generated review posted as Quick104; it does not claim human acceptance. |
Problem
Related issue: #1253
Validation tasks: changes #1254 C1; changes #1255 C3; changes #1256 C8; changes Silo-Server/silo-apple#339 C8; changes Silo-Server/silo-apple#340 C8; changes Silo-Server/silo-android#349 C8; changes Silo-Server/silo-android#350 C8
A multi-file audiobook (part1.mp3 … part10.mp3, no embedded chapters) loses its chapter list the first time anyone plays it. Afterwards the web detail page has no Chapters section, and every client loses chapter navigation for that book.
The scanner gives each file one chapter named after it. Audiobook scans don't record audio tracks, so on first playback the playback probe repair re-probes each part and replaces the stored chapters with what ffprobe finds, which for an mp3 is nothing. This change keeps chapters the reprobe can't reproduce, and lets the next scan restore books that already lost them.
Approach
sourceis notembedded), the stored chapters stay. Embedded chapters still follow the reprobe.No API change:
sourcestays empty for these chapters. jellycompat and the Audiobookshelf-compatible API read the same rows and benefit without changes.Validation
go test ./internal/scanner/... ./internal/playback/... ./internal/catalog/...,make lint-changed: pass.chapters: []immediately after first playback. On the fix build, each part still has its chapter after playback, the detail page lists 10 chapters, and the player shows "part1" → "part2" across the file boundary.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3168/
Surface and build: Web, audiobook detail page after one playback, desktop and phone width; before on
e6df1d8ed, after on this branch; same synthetic files.Risks
None identified. The repair still updates every other probed field.
Checklist
AI Disclosure