fix(authors): fill the missing format root folder from the default when an author is added - #219
Open
jordanfelle wants to merge 2 commits into
Open
jordanfelle wants to merge 2 commits into
jordanfelle wants to merge 2 commits into
Conversation
… is added Import paths create an author for the one format being imported and leave the other format's root folder blank (measured on a live instance: 509 audiobook-only and 303 ebook-only authors created in one week). Those authors are rejected by 'sync monitored across formats', which requires both roots, and later imports of the other format fail with 'No root folder configured for quality type'. AuthorService.AddAuthor/AddAuthors now fill each blank root from the effective default root folder for that format (the configured default, else the only compatible root). Explicit values are never overwritten, and the root is left blank when the default is missing or ambiguous.
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 26, 2026
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 26, 2026
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 26, 2026
…ptional parameter configService is an optional constructor parameter (= null). If the container ever fell back to the default, the configured default root folders would silently never apply in production. Resolve AuthorService from a real DryIoc container with the application's rules and check the configured default is honoured.
jordanfelle
marked this pull request as ready for review
September 27, 2026 01:00
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 27, 2026
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 27, 2026
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 27, 2026
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 27, 2026
jordanfelle
added a commit
to jordanfelle/chaptarr
that referenced
this pull request
Sep 27, 2026
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.
Problem
Import paths create an author for the one format being imported and leave the other format's root folder blank. Measured on a live instance: 509 audiobook-only and 303 ebook-only authors created in one week. Those authors are rejected by "sync monitored across formats" (it requires both roots; the bulk editor warned "Sync was enabled for 1899 author(s). 509 author(s) were skipped because both audiobook and ebook root folders are required."), and later imports of the other format fail with "No root folder configured for quality type".
Fix
AuthorService.AddAuthor/AddAuthorsfill each blank root from the effective default root folder for that format (the configured default, else the only compatible root). Explicit values are never overwritten, and a root is left blank when the default is missing or ambiguous.AuthorPathBuilder.BuildPathForQualitystill throws for a format the author has no root for (intentional signal).Verification
AuthorServiceDefaultRootFoldersFixture(fill both directions, no overwrite, ambiguous default, configured default with several roots, no roots).Behaviour note: a filled root has effects beyond the path.
EnsureAuthorDbFieldscopies that root folder's default quality and metadata profiles and monitored flags onto the author, so an author added for one format now also gets the other format's profiles and monitoring from the root's defaults, and becomes eligible for sync across formats (seeded only if the root folder has an explicit sync default). Pending-import adds previously left that format's profile at 0. This is add-time only and not opt-out; with automatic search enabled it can start grabbing the second format.AuthorServicefrom a real DryIoc container with the app's rules and checks the configured default is honoured, i.e. the optionalIConfigServiceargument is injected in production (3,027 core tests pass).