add SortName client side sort option (#1612)

This commit is contained in:
jeffvli
2026-01-28 20:45:47 -08:00
parent 78aebd7c5d
commit ced3b491ff
10 changed files with 54 additions and 18 deletions
@@ -241,6 +241,7 @@ const normalizeSong = (
releaseYear: item.ProductionYear || null,
sampleRate,
size,
sortName: item.SortName || item.Name,
tags: getTags(item),
trackNumber: item.IndexNumber,
trackSubtitle: null,
@@ -313,6 +314,7 @@ const normalizeAlbum = (
size: null,
songCount: item?.ChildCount || null,
songs: item.Songs?.map((song) => normalizeSong(song, server)),
sortName: item.SortName || item.Name,
tags: getTags(item),
updatedAt: item?.DateLastMediaAdded || item.DateCreated,
userFavorite: item.UserData?.IsFavorite || false,
@@ -560,6 +560,7 @@ const album = z.object({
RunTimeTicks: z.number(),
ServerId: z.string(),
Songs: z.array(song).optional(), // This is not a native Jellyfin property -- this is used for combined album detail
SortName: z.string().optional(),
Studios: z.array(studio),
Tags: z.string().array().optional(),
Type: z.string(),