fix: normalise author group keys to prevent duplicate author cards (#672)#673
Open
s3ntin3l8 wants to merge 1 commit into
Open
fix: normalise author group keys to prevent duplicate author cards (#672)#673s3ntin3l8 wants to merge 1 commit into
s3ntin3l8 wants to merge 1 commit into
Conversation
s3ntin3l8
added a commit
to s3ntin3l8/Listenarr
that referenced
this pull request
Jun 10, 2026
508-storage-per-root-folder landed upstream as PR Listenarrs#656 and is now in upstream/canary, so keeping it in PATCH_BRANCHES would cause conflicts. 672-author-grouping-normalization (PR Listenarrs#673) is the new open patch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ate duplicate cards Extracts normalizeCollectionText to textUtils.ts and imports it in both AudiobooksView and CollectionView (replacing the local copy there). AudiobooksView.groupedCollections now normalises the Map key for both authors and series, so variants differing only in case/spacing/punctuation (e.g. "R.R." vs "R. R.", "Wheel of Time" vs "wheel of time") merge into a single card while the first-seen raw name is preserved for display. This keeps grouping in sync with CollectionView.matchesCurrentCollection, which already normalises both author and series names. Fixes Listenarrs#672. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fe59e0a to
23d3300
Compare
Contributor
|
Heads-up on a small overlap: in #680 (unified library search) I independently added a Easy to resolve either direction: happy to drop mine and have #680 consume yours, or vice-versa — whatever's simplest for the maintainers. No change needed on your end unless #673 lands first, in which case I'll rebase #680 onto it. Just flagging so it's visible before either merges. |
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.
Summary
When metadata returns slightly different formatting for the same author or series name (e.g.
"George R.R. Martin"vs"George R. R. Martin", or"Wheel of Time"vs"wheel of time"), the Library overview created duplicate cards instead of merging them. This extracts the existing normalisation helper fromCollectionView.vueinto shared utils and applies it to the grouping step inAudiobooksView.vue.Changes
Added
normalizeCollectionTextexported fromfe/src/utils/textUtils.ts(extracted from the local copy inCollectionView.vue)Changed
CollectionView.vuenow importsnormalizeCollectionTextfromtextUtilsinstead of defining it locallyAudiobooksView.vuegroupedCollectionsnormalises the Map key for both author and series grouping, so name variants differing only in case/spacing/punctuation merge into one card; the raw first-seen name is preserved for displayFixed
Testing
cd fe && npm run test:unit— 380 tests, 0 failurescd fe && npm run type-check— clean"George R.R. Martin"and"George R. R. Martin"appeared as separate author cards; after the fix a single card shows all booksNotes
Fixes #672.
normalizeCollectionTextwas already used inCollectionView.vue'smatchesCurrentCollection(for both author and series names), which is why clicking either duplicate card already showed all books — the fix just brings the grouping step in sync.🤖 Generated with Claude Code