mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00:00
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:
parent
d68165dab5
commit
1d46cd5ff9
16 changed files with 135 additions and 247 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue