library: the same album in two sources merges into one album
还没有人认领这个 Issue。
评估
调研方向
Start in AlbumIdentityRule.resolve in android/domain/src/commonMain/.../model/AlbumIdentity.kt (lines 75-108), where the mixed-source group falls back to the name key. The key shape change also needs the stored-key migration in AlbumKeyRekey.kt, and the album-key consumers listed in the issue are affected. Done means two sources with the same album name yield separate albums, while discs spread across folders within one source still merge as #637 requires. The design of the optional preferred-source setting is not settled, so it should be scoped separately.
由索引模型根据 Issue 内容生成。
描述
The same album in two sources merges into one album. Bicep's "Bicep" (2017) is in Emby and in the local library (Documents), and iOS shows one album with 24 songs (12 + 12). It should show two distinct albums, each with its own source, and optionally offer a "hide duplicates" setting that prefers one source (local over stream).
Cause: AlbumIdentityRule.resolve (android/domain/src/commonMain/.../model/AlbumIdentity.kt:75-108). It splits an album by source only when every song carries an MB release id or server album id (:99-103). The local files have neither, so the mixed group falls back to the name key (album + album artist) and merges. This is shared KMP code, so Android behaves the same (unverified on device). Merging by name is deliberate from #637, e.g. discs spread across folders, so the fix has to keep that within a source.
Blast radius: everything keyed on AlbumGroupKey:
- album song counts, artist album counts and album-artist pages
- album sort and headers in Songs
- suggestions (recently added, completed)
- play history,
PlayContext.Albumand pinned collections - routes, the CarPlay offline set and Android Downloads
Changing the key shape needs a stored-key rekey (AlbumKeyRekey.kt). Queue, shuffle and playlists are per song id, so they are unaffected.
Sketch: put the media provider in the name-rule bucket in resolve, so each source groups by name separately, plus the rekey migration. "Hide duplicates" is a separate, larger preferred-source rule on top; check how Symfonium and Plexamp present this.
Seen on iOS, 2026-10-16, while testing #1064 with the same albums copied locally and streamed from Emby.
Impact U2 (wrong song counts and mixed sources in album and artist views) · Reach R2 (anyone with an album in two sources; owner device repro) · Implemented: partly (source-scoped identity only for fully id-tagged albums) · Design fit: tension (#637 merges by name on purpose; change once in shared code for parity) · Complexity: M
- 主要语言
- Kotlin
- 星标
- 231
- 派生
- 28
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
timusus/Shuttle2 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 85/100
-
support/scripts/asc: S2 bundle id resolves to the Podcasts app (bundleId filter is a prefix match)未关闭bug next-release
难度 2/5 1-3 小时 新手友好度 78/100
-
bug design impact:U1 later P3 reach:R2 size:S
难度 2/5 1-3 小时 新手友好度 65/100
-
enhancement impact:U1 later P3 reach:R2 size:S
难度 2/5 1-3 小时 新手友好度 68/100
-
impact:U1 owner reach:R1 size:S
难度 2/5 1-3 小时 新手友好度 72/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
navikt/mock-oauth2-server#1129 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
mikepenz/AboutLibraries#1488 · 2 条评论 ·
维护者通常 1 天内回复
-
area/kotlin
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
Type: bug
难度 2/5 1-3 小时 新手友好度 68/100
holunda-io/c7#549 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复