fix subsonic / jellyfin issues

This commit is contained in:
jeffvli
2025-11-29 17:54:44 -08:00
parent 108ba53be2
commit 8611bb9755
2 changed files with 12 additions and 11 deletions
@@ -619,7 +619,7 @@ export const SubsonicController: InternalControllerEndpoint = {
); );
}, },
getGenreList: async ({ apiClientProps, query }) => { getGenreList: async ({ apiClientProps, query }) => {
const sortOrder = query.sortOrder.toLowerCase() as 'asc' | 'desc'; const sortOrder = (query.sortOrder?.toLowerCase() ?? 'asc') as 'asc' | 'desc';
const res = await ssApiClient(apiClientProps).getGenres({}); const res = await ssApiClient(apiClientProps).getGenres({});
@@ -295,7 +295,8 @@ const normalizeAlbum = (
createdAt: item.DateCreated, createdAt: item.DateCreated,
duration: item.RunTimeTicks / 10000, duration: item.RunTimeTicks / 10000,
explicitStatus: null, explicitStatus: null,
genres: item.GenreItems?.map((entry) => ({ genres:
item.GenreItems?.map((entry) => ({
_itemType: LibraryItem.GENRE, _itemType: LibraryItem.GENRE,
_serverId: server?.id || '', _serverId: server?.id || '',
_serverType: ServerType.JELLYFIN, _serverType: ServerType.JELLYFIN,
@@ -304,7 +305,7 @@ const normalizeAlbum = (
imageUrl: null, imageUrl: null,
name: entry.Name, name: entry.Name,
songCount: null, songCount: null,
})), })) || [],
id: item.Id, id: item.Id,
imagePlaceholderUrl: null, imagePlaceholderUrl: null,
imageUrl: getAlbumCoverArtUrl({ imageUrl: getAlbumCoverArtUrl({