Skip to content

feature: multi-part m4b merging - #120

Open
benjitobz wants to merge 1 commit into
Chaptarr:developfrom
benjitobz:feature/m4b-merge-multi-part
Open

feature: multi-part m4b merging#120
benjitobz wants to merge 1 commit into
Chaptarr:developfrom
benjitobz:feature/m4b-merge-multi-part

Conversation

@benjitobz

Copy link
Copy Markdown

Description

Chaptarr already merges multi-part audiobook downloads into a single M4B when conversion is planned, but releases that arrive as multiple M4B parts are skipped entirely — since no format conversion was needed. This adds an opt-in "Create Single File" setting on quality profiles: when enabled, multi-part downloads whose parts are already M4B are merged into one M4B file on import. Embedded chapters from each part are preserved and re-offset in the merged file, so chapter navigation survives the concatenation instead of being lost. With the setting off (the default), behavior is unchanged. Reason for adding this is it's nice to have the books in one file, especially while using ABS in a vehicle.

Fixes # — n/a (feature)

Database Migration

YES - Migration 103_add_quality_profile_merge_multi_part_files:

  • Adds a MergeMultiPartFiles boolean column (not-null, default false) to the QualityProfiles table, guarded by an existence check.
  • The fresh-install baseline schema (001_chaptarr_complete_schema) is updated to include the same column.

How was this tested?

Docker (linux/amd64) on an Ubuntu server host, image built with Dockerfile.build. Exercised with real multi-part audiobook releases:

  • With "Create Single File" enabled on the profile: multi-part M4B releases are merged into a single M4B on import, and the merged file's chapters were verified present and correctly offset across part boundaries.
  • With the setting disabled: multi-part M4B releases import unchanged (parts kept), confirming the gate defaults to existing behavior.
  • Existing multi-part MP3 → M4B conversion paths re-tested to confirm they're unaffected.
  • Migration verified on an existing database (column added, profiles default to off) and on a fresh install via the baseline schema.

Screenshots (UI changes only) - (red box is just show the change not actually present in the UI)

image

A note on AI: We know AI/agentic coding is everywhere and only getting
more popular. We won't insist that you disclose whether you used it or which
models you used, but in the same spirit, please don't take offense if your PR
is scrutinized and changes are requested.

Review time: The longer the PR and the more lines changed, the longer the
review will take. Small, focused PRs merge fastest. If yours is big, please be
patient.

@benjitobz benjitobz changed the title Multi-part M4B merging feature: Multi-part M4B merging Sep 3, 2026
@benjitobz benjitobz changed the title feature: Multi-part M4B merging feature: multi-part m4bmerging Sep 3, 2026
@benjitobz
benjitobz force-pushed the feature/m4b-merge-multi-part branch from 8979369 to ad97b78 Compare September 3, 2026 20:00
@benjitobz benjitobz changed the title feature: multi-part m4bmerging feature: multi-part m4b merging Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant