audiobookshelf/client/components/modals
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
..
authors Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
bookmarks Fix double slash color modifer typo 2025-03-23 08:57:13 +02:00
changelog Use getServerSetting to ensure serverSettings is set before accessing 2025-07-06 17:39:03 -05:00
collections Update collection create/update endpoints to strip html tags from collection name 2026-03-19 16:53:21 -05:00
emails Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
item Add "Download by Chapters" tool for audiobooks 2026-04-14 17:24:01 -06:00
libraries Update providers users to fetch providers on demand 2025-10-19 18:57:27 +03:00
notification Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
player Fix Cover modal showing error image for items with no cover, update placeholder cover url to all come from global store 2025-03-27 17:37:25 -05:00
playlists Sort the playlist sections alphabetically. 2025-12-12 04:18:29 +00:00
podcast Add episode updated translation for podcast match #4606 2025-08-19 16:52:50 -05:00
rssfeed Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
AccountModal.vue Update ereaders to handle refreshing, epubjs to use custom request method, separate accessToken in store 2025-07-10 16:54:28 -05:00
AddCustomMetadataProviderModal.vue Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
ApiKeyCreatedModal.vue Add get all, update and delete endpoints. Add api keys config page 2025-06-30 11:32:02 -05:00
ApiKeyModal.vue Update API Keys to be tied to a user, add apikey lru-cache, handle deactivating expired keys 2025-06-30 14:53:11 -05:00
AudioFileDataModal.vue Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
BackupScheduleModal.vue Translation strings added (#3304) 2024-08-30 17:47:49 -05:00
BatchQuickMatchModel.vue Update providers users to fetch providers on demand 2025-10-19 18:57:27 +03:00
BookmarksModal.vue Use getServerSetting to ensure serverSettings is set before accessing 2025-07-06 17:39:03 -05:00
ChaptersModal.vue Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
Dialog.vue Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
EditSeriesInputInnerModal.vue Update edit series sequence to show error when sequence has spaces #4314 2025-05-19 17:37:11 -05:00
ListeningSessionModal.vue Update sessions modal to show username & update sessions endpoints to always return username 2025-07-16 16:56:07 -05:00
Modal.vue Update API Keys to be tied to a user, add apikey lru-cache, handle deactivating expired keys 2025-06-30 14:53:11 -05:00
PlayerSettingsModal.vue Add dropdown to player settings modal to set the playbackRateIncrementDecrement amount 2025-01-25 01:58:13 +00:00
RawCoverPreviewModal.vue Fix:Fullscreen cover image modal not updating when changing covers #2900 2024-05-02 17:48:50 -05:00
ShareModal.vue Use getServerSetting to ensure serverSettings is set before accessing 2025-07-06 17:39:03 -05:00
SleepTimerModal.vue Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00
UploadImageModal.vue Tailwind V4 migration initial commit 2025-03-16 16:41:37 +02:00