audiobookshelf/client/components
Victor Da Luz 640c2f98b8 Add "Download by Chapters" tool for audiobooks
Adds a new tool in the item tools tab that splits a book's audio file
into per-chapter files using ffmpeg -c copy (no re-encoding) and
packages them as a ZIP download.

Key details:
- New GET /api/items/:id/download-chapters endpoint
- Accepts optional ?fileIno= to select which audio file to split when
  a book has multiple (e.g. m4b + mp3)
- Computes each file's start offset in the global chapter timeline and
  filters + re-bases chapter timestamps to be file-relative before
  splitting, handling the case where ABS stores chapters from all audio
  files with concatenated global timestamps
- Splits all chapters in parallel (ffmpeg -c copy per chapter) then
  streams the result as a ZIP
- Temp files written to MetadataPath/cache/items/:id/chapter-split-:ts
  with a timestamp suffix to prevent concurrent request collisions;
  cleaned up in a finally block regardless of success or failure
- UI shows a file selector dropdown when multiple audio files exist,
  with "Preparing..." state feedback during the request
- 10 new tests covering guard conditions and the chapter offset logic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:24:01 -06:00
..
app Update Confirm component to support allowHtml prompt option 2026-03-18 16:51:51 -05:00
cards Update tooltip with plaintext prop 2025-12-12 17:24:01 -06:00
content Fix item page text overlap on details #4187 2025-04-07 17:19:48 -05:00
controls Display localized/styled text for selected filter. 2025-12-28 11:28:36 -06:00
covers Implement new JWT auth 2025-06-29 17:22:58 -05:00
modals Add "Download by Chapters" tool for audiobooks 2026-04-14 17:24:01 -06:00
player Fix aria-label for jumpBackward button 2026-01-09 14:26:56 +00:00
prompt Update Confirm component to support allowHtml prompt option 2026-03-18 16:51:51 -05:00
readers Fix epub toc search input colors for themes 2025-07-25 17:31:59 -05:00
stats Update tooltip with plaintext prop 2025-12-12 17:24:01 -06:00
tables Merge branch 'master' into jwt_auth_refactor 2025-07-07 16:50:58 -05:00
ui Merge pull request #4649 from votex001/multi-select-item-fix 2025-12-21 14:58:04 -06:00
widgets Fix item edit modal show next/prev arrows when opening from Files or Match context menu item #4718 2025-10-08 14:52:14 -05:00