You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix joined narrator credits in ABS sidecars - #362
The importer can store two narrator credits joined with +, while the ABS exporter only splits commas and semicolons. The exported narrators array can therefore retain the joined string alongside the individual edition credits.
Recognize the existing space-plus-space join delimiter before trimming and case-insensitive deduplication. Add regression coverage for joined credits from the file/edition/book inputs and preserve literal plus signs such as C++ Narrator and First+Second.
This changes credit formatting only. It does not choose a different edition, change the underlying source tags, or establish who narrated a particular recording. The regression test exercises the exporter directly; existing untracked sidecars are still protected by the metadata service's ownership rules.
On macOS arm64 with .NET SDK 10.0.404, against develop commit 04c1ed1fba2ba08b72ea5e80f85578eaa076ffe3:
dotnet test src/Chaptarr.Core.Test/Chaptarr.Core.Test.csproj --filter FullyQualifiedName~AudioBookShelfMetadataFixture
With the new tests and the original exporter: 1 failed, 19 passed. The failure retains the joined narrator string instead of the first individual name.
With the splitter change: all 20 tests pass.
The cases also cover comma/semicolon fallbacks, case-insensitive duplicates and plus signs that are not the join delimiter.
git diff --check passes.
Screenshots (UI changes only)
N/A.
Summary by CodeRabbit
Bug Fixes
Narrator and name entries separated by " + " are now recognized as separate names, while plus signs without that exact spacing remain part of the name.
Comma- and semicolon-separated names continue to be supported.
Review was skipped as selected files did not have any reviewable changes.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: e088e86b-bdc5-4169-8c42-692c0db6237d
Commits
Reviewing files that changed from the base of the PR and between 25f4ca9 and 5c0df5d.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The AudioBookShelf metadata exporter now splits narrator strings on " + " as well as commas and semicolons. New tests cover joined narrator credits, case-insensitive deduplication across sources, and names with literal plus signs.
Changes: Narrator Name Splitting
Layer / File(s)
Summary
Split joined narrator credits src/NzbDrone.Core/Extras/Metadata/Consumers/AudioBookShelf/AudioBookShelfMetadata.cs, src/Chaptarr.Core.Test/Extras/Metadata/AudioBookShelfMetadataFixture.cs
SplitNames recognizes " + " as a separator. Tests verify joined credits split, narrator names from multiple sources deduplicate case-insensitively, and plus signs without that separator remain part of a name.
Joined narrator credits separated by " + " are now exported as individual narrators, while names with literal plus signs such as "C++ Narrator" stay intact. The change is narrow and tested, and no actionable merge risk remains.
Security architecture risk: Minimal · up to 26c0d
The change only separates joined narrator credits in exported metadata. It does not expand access, change output destinations, or alter which edition is selected. No introduced or worsened security issue was identified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The changed input interpretation affects narrator values in eligible sidecar output. Within the inspected path, even attacker-influenced narrator text remains metadata content rather than gaining control over destination selection, identity, or privileges.
Trust Boundaries and Controls
observed — The exporter continues to return serialized content in a MetadataFileResult with overwriteExisting enabled. This policy predates the change; the delimiter does not influence it. Returning this result does not itself establish downstream authorization to overwrite an existing sidecar.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Fix joined narrator credits in ABS sidecars" matches the main change. The PR makes the ABS exporter split narrator names on the " + " join delimiter, so the exported narrators array lists i…
Description check
The description covers the required template sections. It explains the change and why it is needed, and it links the issue with "Fixes #361". It states that no database migration is needed. It gives d…
Linked Issues check
Issue #361 requires the ABS sidecar narrators array to list each narrator once when a file credit joins edition narrator names with +. The change at head adds " + " to the delimiter array in `Au…
Out of Scope Changes check
The diff at head changes two files only. One is the ABS exporter SplitNames delimiter list, a one-line change directly tied to #361. The other is AudioBookShelfMetadataFixture.cs, which adds regre…
Full details: Title check
Explanation
The title "Fix joined narrator credits in ABS sidecars" matches the main change. The PR makes the ABS exporter split narrator names on the " + " join delimiter, so the exported narrators array lists individual names. The title is short, specific, and states the primary change.
Full details: Description check
Explanation
The description covers the required template sections. It explains the change and why it is needed, and it links the issue with "Fixes #361". It states that no database migration is needed. It gives detailed test steps on macOS arm64 with the .NET SDK, including before and after results. The screenshots section is marked N/A. The description clearly identifies scope and limits. The AI note in the template does not require content from the author.
Full details: Linked Issues check
Explanation
Issue #361 requires the ABS sidecar narrators array to list each narrator once when a file credit joins edition narrator names with +. The change at head adds " + " to the delimiter array in AudioBookShelfMetadata.SplitNames (src/NzbDrone.Core/Extras/Metadata/Consumers/AudioBookShelf/AudioBookShelfMetadata.cs). The split runs before the existing Trim() and the non-empty filter, so joined names separate before trimming and deduplication. Comma and semicolon splitting is unchanged. The new test should_split_joined_narrator_credits_and_deduplicate_individual_names covers joined file, edition, and book credits, a semicolon fallback, and case-insensitive duplicates. The [TestCase("C++ Narrator")] and [TestCase("First+Second")] cases cover literal plus signs. The diff does not show the downstream deduplication code. The test expectations and the reported test run (20 passing after the change) support its behavior. The change does not alter edition selection or source tags, as the issue requires.
Full details: Out of Scope Changes check
Explanation
The diff at head changes two files only. One is the ABS exporter SplitNames delimiter list, a one-line change directly tied to #361. The other is AudioBookShelfMetadataFixture.cs, which adds regression tests for the same exporter behavior. No unrelated production code, configuration, or edition-selection logic is modified. The PR description states the change is limited to credit formatting, and the diff matches that statement.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
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
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
The importer can store two narrator credits joined with
+, while the ABS exporter only splits commas and semicolons. The exportednarratorsarray can therefore retain the joined string alongside the individual edition credits.Recognize the existing space-plus-space join delimiter before trimming and case-insensitive deduplication. Add regression coverage for joined credits from the file/edition/book inputs and preserve literal plus signs such as
C++ NarratorandFirst+Second.This changes credit formatting only. It does not choose a different edition, change the underlying source tags, or establish who narrated a particular recording. The regression test exercises the exporter directly; existing untracked sidecars are still protected by the metadata service's ownership rules.
Fixes #361
Database Migration
No.
How was this tested?
On macOS arm64 with .NET SDK
10.0.404, againstdevelopcommit04c1ed1fba2ba08b72ea5e80f85578eaa076ffe3:dotnet test src/Chaptarr.Core.Test/Chaptarr.Core.Test.csproj --filter FullyQualifiedName~AudioBookShelfMetadataFixturegit diff --checkpasses.Screenshots (UI changes only)
N/A.
Summary by CodeRabbit
" + "are now recognized as separate names, while plus signs without that exact spacing remain part of the name.