mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
Revert jellyfin getPlaylistList implementation (#272)
This commit is contained in:
@@ -102,9 +102,9 @@ const authenticate = async (
|
||||
Username: body.username,
|
||||
},
|
||||
headers: {
|
||||
'x-emby-authorization': `MediaBrowser Client="Feishin", Device="${getHostname()}", DeviceId="Feishin-${getHostname()}-${body.username}", Version="${
|
||||
packageJson.version
|
||||
}"`,
|
||||
'x-emby-authorization': `MediaBrowser Client="Feishin", Device="${getHostname()}", DeviceId="Feishin-${getHostname()}-${
|
||||
body.username
|
||||
}", Version="${packageJson.version}"`,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -561,20 +561,6 @@ const getPlaylistList = async (args: PlaylistListArgs): Promise<PlaylistListResp
|
||||
throw new Error('No userId found');
|
||||
}
|
||||
|
||||
const musicFoldersRes = await jfApiClient(apiClientProps).getMusicFolderList({
|
||||
params: {
|
||||
userId: apiClientProps.server?.userId,
|
||||
},
|
||||
});
|
||||
|
||||
if (musicFoldersRes.status !== 200) {
|
||||
throw new Error('Failed playlist folder');
|
||||
}
|
||||
|
||||
const playlistFolder = musicFoldersRes.body.Items.filter(
|
||||
(folder) => folder.CollectionType === jfType._enum.collection.PLAYLISTS,
|
||||
)?.[0];
|
||||
|
||||
const res = await jfApiClient(apiClientProps).getPlaylistList({
|
||||
params: {
|
||||
userId: apiClientProps.server?.userId,
|
||||
@@ -583,7 +569,8 @@ const getPlaylistList = async (args: PlaylistListArgs): Promise<PlaylistListResp
|
||||
Fields: 'ChildCount, Genres, DateCreated, ParentId, Overview',
|
||||
IncludeItemTypes: 'Playlist',
|
||||
Limit: query.limit,
|
||||
ParentId: playlistFolder?.Id,
|
||||
MediaTypes: 'Audio',
|
||||
Recursive: true,
|
||||
SearchTerm: query.searchTerm,
|
||||
SortBy: playlistListSortMap.jellyfin[query.sortBy],
|
||||
SortOrder: sortOrderMap.jellyfin[query.sortOrder],
|
||||
|
||||
Reference in New Issue
Block a user