Add dedicated playlist song list page

This commit is contained in:
jeffvli 2023-01-01 13:58:05 -08:00
parent 737a05e2c5
commit 8b04f70106
11 changed files with 653 additions and 318 deletions

View file

@ -376,8 +376,11 @@ const getPlaylistSongList = async (args: PlaylistSongListArgs): Promise<JFSongLi
const searchParams: JFSongListParams = {
fields: 'Genres, DateCreated, MediaSources, UserData, ParentId',
includeItemTypes: 'Audio',
limit: query.limit,
sortBy: query.sortBy ? songListSortMap.jellyfin[query.sortBy] : undefined,
sortOrder: query.sortOrder ? sortOrderMap.jellyfin[query.sortOrder] : undefined,
startIndex: 0,
userId: server?.userId || '',
};
const data = await api

View file

@ -24,7 +24,6 @@ import {
NDAlbumListSort,
NDAlbumDetail,
NDSongList,
NDSongListSort,
NDSongDetail,
NDAlbumArtistList,
NDAlbumArtistListSort,
@ -33,6 +32,7 @@ import {
NDPlaylistList,
NDPlaylistListSort,
NDPlaylistDetail,
NDSongListSort,
} from '/@/renderer/api/navidrome.types';
import {
SSAlbumList,
@ -404,6 +404,7 @@ export enum SongListSort {
DURATION = 'duration',
FAVORITED = 'favorited',
GENRE = 'genre',
ID = 'id',
NAME = 'name',
PLAY_COUNT = 'playCount',
RANDOM = 'random',
@ -465,6 +466,7 @@ export const songListSortMap: SongListSortMap = {
duration: JFSongListSort.DURATION,
favorited: undefined,
genre: undefined,
id: undefined,
name: JFSongListSort.NAME,
playCount: JFSongListSort.PLAY_COUNT,
random: JFSongListSort.RANDOM,
@ -484,6 +486,7 @@ export const songListSortMap: SongListSortMap = {
duration: NDSongListSort.DURATION,
favorited: NDSongListSort.FAVORITED,
genre: NDSongListSort.GENRE,
id: NDSongListSort.ID,
name: NDSongListSort.TITLE,
playCount: NDSongListSort.PLAY_COUNT,
random: undefined,
@ -503,6 +506,7 @@ export const songListSortMap: SongListSortMap = {
duration: undefined,
favorited: undefined,
genre: undefined,
id: undefined,
name: undefined,
playCount: undefined,
random: undefined,