Files
kima-hub/backend
Your Name d1bc273f00 fix: preserve album track order for NULL discNumber (nulls first)
Prisma's default ASC sort uses Postgres NULLS LAST, so the compound
order `[discNumber asc, trackNo asc]` added in PR #170 reorders
tracks in mixed-state libraries: any album where some tracks have
been rescanned post-migration (getting discNumber) and others have
not (staying NULL) ends up with the numbered-disc tracks first and
the NULL-disc tracks dumped at the end, breaking the original
trackNo order that users expected.

Fix: use `{ sort: 'asc', nulls: 'first' }` on discNumber in all six
orderBy call sites (library/albums, offline, share, and the three
places in subsonic/library). This keeps NULL-disc tracks sorting
before disc-1 tracks, preserving pre-migration behavior for
all-NULL albums (the common case right after upgrade) and only
slightly reordering partially-rescanned multi-disc albums (rare,
and only until a full rescan completes).

Found during pre-release review.
2026-04-07 18:15:05 -05:00
..
2025-12-25 18:58:06 -06:00
2025-12-25 18:58:06 -06:00
2025-12-25 18:58:06 -06:00
2025-12-25 18:58:06 -06:00
2026-04-06 15:37:48 -05:00