Repository navigation
Fix a crash showing search results with two copies of a song - #425
Merged
Merged
Conversation
Store screenshotsFrom run 46030879576, against clementine-it. Left: the store listing of the latest release, v13.15, which shows the dark theme. Right: this pull request, dark and light. |
hatstand
enabled auto-merge (rebase)
November 27, 2026 16:04
The search results list each song under a key made of its section and what it's browsed by: where it came from, album artist, album and title. Two songs with all of those the same, such as an MP3 and a FLAC of one song in the same album, or two tracks of an album with the same title, then had the same key, and the list crashed with an IllegalArgumentException (issue #390). Each result's key now also counts the results before it with the same selection. Release-note: Fixed a crash when search found two songs with the same title on the same album. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R2bAq86gzrpUJ68mxNbEGc
hatstand
force-pushed
the
claude/project-thread-rf7abf
branch
from
November 27, 2026 16:07
55d46b3 to
08d4a2e
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.

































Requested by John · project thread
Depends on no other pull request.
Fixes #390, which Play reopened with a report from 13.15 (version code 2151), after the Downloads tab fix in 13.11.
The search results list each song under a key of its section and what it's browsed by: source, album artist, album and title. Two songs with all of those the same, such as an MP3 and a FLAC of one song in the same album, or two tracks of an album with the same title, got the same key, and the
LazyColumnthrewIllegalArgumentException: Key ... was already usedfromLayoutNodeSubcompositionsState.subcompose, the top frame of Play's trace. This affects both Clementine's global search and the search of the library on the phone, which share the list.Each result's key now also counts the results before it with the same selection, so keys stay the same as before for every result that isn't a copy.
Testing
SearchScreenTest.showsTwoCopiesOfTheSameSongsearches a library with two copies of a song. On its own, before the fix, it fails in CI with the same exception as Play's reports (run):Play's traces don't name the key, so this is the likeliest cause from reading every keyed list in the app, not a certainty. The other lists' keys are unique by construction (database primary keys,
groupByordistinctresults, or download ids).Generated by Claude Code