client-side only sort for all playlists (#1125)

* initial client-side only sort for all playlists

* allow reordering jellyfin (assume it works properly) and navidrome

* on playlist page, add to queue by sort order
This commit is contained in:
Kendall Garner 2025-09-18 04:06:30 +00:00 committed by GitHub
parent d68165dab5
commit 1d46cd5ff9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 135 additions and 247 deletions

View file

@ -759,18 +759,14 @@ export const SubsonicController: ControllerEndpoint = {
throw new Error('Failed to get playlist song list');
}
let results =
const items =
res.body.playlist.entry?.map((song) => ssNormalize.song(song, apiClientProps.server)) ||
[];
if (query.sortBy && query.sortOrder) {
results = sortSongList(results, query.sortBy, query.sortOrder);
}
return {
items: results,
items,
startIndex: 0,
totalRecordCount: results?.length || 0,
totalRecordCount: items.length,
};
},
getRandomSongList: async (args) => {