Add separate filter for album song list fetch

This commit is contained in:
jeffvli 2023-01-03 03:15:09 -08:00
parent f2e6a418b0
commit b8b8ca9f66
3 changed files with 3 additions and 2 deletions

View File

@ -251,7 +251,7 @@ const getSongList = async (args: SongListArgs): Promise<NDSongList> => {
const { query, server, signal } = args; const { query, server, signal } = args;
const searchParams: NDSongListParams = { const searchParams: NDSongListParams = {
_end: query.startIndex + (query.limit || 0), _end: query.startIndex + (query.limit || -1),
_order: sortOrderMap.navidrome[query.sortOrder], _order: sortOrderMap.navidrome[query.sortOrder],
_sort: songListSortMap.navidrome[query.sortBy], _sort: songListSortMap.navidrome[query.sortBy],
_start: query.startIndex, _start: query.startIndex,

View File

@ -215,6 +215,7 @@ export type NDAlbumListParams = {
export enum NDSongListSort { export enum NDSongListSort {
ALBUM = 'album, order_album_artist_name, disc_number, track_number, title', ALBUM = 'album, order_album_artist_name, disc_number, track_number, title',
ALBUM_ARTIST = 'albumArtist', ALBUM_ARTIST = 'albumArtist',
ALBUM_SONGS = 'discNumber, trackNumber',
ARTIST = 'artist', ARTIST = 'artist',
BPM = 'bpm', BPM = 'bpm',
CHANNELS = 'channels', CHANNELS = 'channels',

View File

@ -481,7 +481,7 @@ export const songListSortMap: SongListSortMap = {
year: undefined, year: undefined,
}, },
navidrome: { navidrome: {
album: NDSongListSort.ALBUM, album: NDSongListSort.ALBUM_SONGS,
albumArtist: NDSongListSort.ALBUM_ARTIST, albumArtist: NDSongListSort.ALBUM_ARTIST,
artist: NDSongListSort.ARTIST, artist: NDSongListSort.ARTIST,
bpm: NDSongListSort.BPM, bpm: NDSongListSort.BPM,