Fix the alphabet index bucketing by display name instead of Emby SortName #16
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/alphabet-index-sort-order"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A, B, T, B, L):getLibraryItems/getArtistsorder the array by Emby'sSortBy: SortName(which strips leading articles like "The"/"Le"/"L'"), but never fetched each item's actualSortNamevalue — soalphaIndex.tshad to bucket by the raw display name instead, and any article-stripped title landed in a completely different bucket than where Emby had actually placed it in the array, throwing a spurious heading (and a duplicate of the real one right after) into the middle of an otherwise-correct run.getLibraryItems/getArtistsnow also requestFields: SortName; newItemDto.sortNamecarries it through (server/src/types.ts,client/src/types.ts), falling back tonamefor every other endpoint that doesn't request it (same shapedurationTicks/indexNumberalready use);alphaIndex.tsbuckets bysortName, notname.Test plan
npm run typecheck— clean (client + server)npm run test(server) — 147/147 passingnpm run build(client) — clean"The Bunker", sortName"Bunker") positioned between two other B titles — confirmed it produced the sameA, B, T, B, Lheading sequence against the old bucket-by-name code, then confirmed the fix collapses it to the correctA, B, Lagainst the identical input.🤖 Generated with Claude Code