mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-07 18:01:42 +00:00
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> |
||
|---|---|---|
| .. | ||
| authors | ||
| bookmarks | ||
| changelog | ||
| collections | ||
| emails | ||
| item | ||
| libraries | ||
| notification | ||
| player | ||
| playlists | ||
| podcast | ||
| rssfeed | ||
| AccountModal.vue | ||
| AddCustomMetadataProviderModal.vue | ||
| ApiKeyCreatedModal.vue | ||
| ApiKeyModal.vue | ||
| AudioFileDataModal.vue | ||
| BackupScheduleModal.vue | ||
| BatchQuickMatchModel.vue | ||
| BookmarksModal.vue | ||
| ChaptersModal.vue | ||
| Dialog.vue | ||
| EditSeriesInputInnerModal.vue | ||
| ListeningSessionModal.vue | ||
| Modal.vue | ||
| PlayerSettingsModal.vue | ||
| RawCoverPreviewModal.vue | ||
| ShareModal.vue | ||
| SleepTimerModal.vue | ||
| UploadImageModal.vue | ||