feat: Emby support (#234)
* fix: support credential extraction from Emby * fix: minor compatibility with emby for retrieving albums * fix: rename credentials and save credentials type * fix: weird issue when changing libraries * fix: correctly map platform names in auth header * chore: properly carry over old settings * fix: only enable playlists on jellyfin * fix: remove jellyfin mentions * fix: incorporate jellyfin and emby as mentions
This commit is contained in:
@@ -36,7 +36,9 @@ export async function retrieveAlbum(id: string): Promise<Album> {
|
||||
const latestAlbumsOptions = {
|
||||
IncludeItemTypes: 'MusicAlbum',
|
||||
Fields: 'DateCreated',
|
||||
SortOrder: 'Ascending',
|
||||
SortOrder: 'Descending',
|
||||
SortBy: 'DateCreated',
|
||||
Recursive: 'true',
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -51,7 +53,8 @@ export async function retrieveRecentAlbums(numberOfAlbums = 24) {
|
||||
const params = new URLSearchParams(options).toString();
|
||||
|
||||
// Retrieve albums
|
||||
return fetchApi<Album[]>(({ user_id }) => `/Users/${user_id}/Items/Latest?${params}`);
|
||||
return fetchApi<{ Items: Album[] }>(({ user_id }) => `/Users/${user_id}/Items?${params}`)
|
||||
.then((d) => d.Items);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user