From 92039b95c3a9cc88720829a81c41f6bd5362c374 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Mon, 27 Feb 2023 12:44:25 -0800 Subject: [PATCH] Fix types on top song request --- src/renderer/api/jellyfin.api.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/api/jellyfin.api.ts b/src/renderer/api/jellyfin.api.ts index d4ae8fc3..5f506ff1 100644 --- a/src/renderer/api/jellyfin.api.ts +++ b/src/renderer/api/jellyfin.api.ts @@ -37,6 +37,7 @@ import { JFSongListResponse, JFSongListSort, JFCollectionType, + JFSortOrder, } from '/@/renderer/api/jellyfin.types'; import { Album, @@ -74,7 +75,6 @@ import { ScrobbleArgs, RawScrobbleResponse, TopSongListArgs, - SortOrder, } from '/@/renderer/api/types'; import { useAuthStore } from '/@/renderer/store'; import { ServerListItem, ServerType } from '/@/renderer/types'; @@ -329,17 +329,17 @@ const getAlbumList = async (args: AlbumListArgs): Promise => { }; }; -const getTopSongList = async (args: TopSongListArgs): Promise => { +const getTopSongList = async (args: TopSongListArgs): Promise => { const { signal, server, query } = args; - const searchParams: any = { + const searchParams: JFSongListParams = { artistIds: query.artistId, fields: 'Genres, DateCreated, MediaSources, ParentId', includeItemTypes: 'Audio', limit: query.limit, recursive: true, sortBy: JFSongListSort.COMMUNITY_RATING, - sortOrder: SortOrder.DESC, + sortOrder: JFSortOrder.DESC, userId: server?.userId || '', }; @@ -350,7 +350,7 @@ const getTopSongList = async (args: TopSongListArgs): Promise => { searchParams: parseSearchParams(searchParams), signal, }) - .json(); + .json(); return { items: data.Items,