Merge multi-part M4B downloads into a single file - #91
Draft
benjitobz wants to merge 3 commits into
Draft
Conversation
benjitobz
force-pushed
the
multipart-m4b-merge
branch
from
August 27, 2026 19:04
01d348f to
6c3ab7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Multi-part downloads that already consist of M4B files were the one case the M4B conversion pipeline did not create 1 m4b file. There was a guard in
ImportApprovedBookswhich skipped conversion entirely, so a 10-part M4B audiobook imported as 10 separate files while multi-part MP3/M4A/FLAC merged into one. This was obviously intentional but for some setups a single m4b file works better.This adds an opt-in per-quality-profile setting,
MergeMultiPartFiles, exposed as a "Create Single File" checkbox below Convert To in the quality profile editor. When enabled, multi-part all-M4B downloads are routed through the existingm4b-tool mergepipeline like any other format.GetPlannedConversionTargetis unchanged, so queue display and decision-engine effective-quality comparisons behave exactly as before; the newShouldMergeMultiPartM4bhelper gates the import path only.openapi.json, and settings backups.Database Migration
YES.
Migration 103 adds a
MergeMultiPartFilesboolean column (NOT NULL, default false) toQualityProfiles, with an existence check Migration 001 complete-schema migration gains the same column for fresh installs.How was this tested?
Built with
docker build -f Dockerfile.buildon Ubuntu and deployed over a live SQLite install (v0.9.936.0) that previously ran the base branch. Verified on startup:GET /api/v1/qualityprofilereturnsmergeMultiPartFileson existing profiles (defaulting to false).Screenshots (UI changes only)