diff --git a/src/shared/api/jellyfin/jellyfin-normalize.ts b/src/shared/api/jellyfin/jellyfin-normalize.ts index 94126376b..96ac2bdff 100644 --- a/src/shared/api/jellyfin/jellyfin-normalize.ts +++ b/src/shared/api/jellyfin/jellyfin-normalize.ts @@ -269,9 +269,11 @@ const normalizeSong = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || '', _serverType: ServerType.JELLYFIN, + albumCount: null, id: entry.Id, imageUrl: null, name: entry.Name, + songCount: null, })), id: item.Id, imagePlaceholderUrl: null, @@ -333,9 +335,11 @@ const normalizeAlbum = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || '', _serverType: ServerType.JELLYFIN, + albumCount: null, id: entry.Id, imageUrl: null, name: entry.Name, + songCount: null, })), id: item.Id, imagePlaceholderUrl: null, @@ -398,9 +402,11 @@ const normalizeAlbumArtist = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || '', _serverType: ServerType.JELLYFIN, + albumCount: null, id: entry.Id, imageUrl: null, name: entry.Name, + songCount: null, })), id: item.Id, imageUrl: getAlbumArtistCoverArtUrl({ @@ -442,9 +448,11 @@ const normalizePlaylist = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || '', _serverType: ServerType.JELLYFIN, + albumCount: null, id: entry.Id, imageUrl: null, name: entry.Name, + songCount: null, })), id: item.Id, imagePlaceholderUrl, @@ -515,11 +523,11 @@ const normalizeGenre = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || '', _serverType: ServerType.JELLYFIN, - albumCount: undefined, + albumCount: null, id: item.Id, imageUrl: getGenreCoverArtUrl({ baseUrl: server?.url || '', item, size: 200 }), name: item.Name, - songCount: undefined, + songCount: null, }; }; diff --git a/src/shared/api/navidrome/navidrome-normalize.ts b/src/shared/api/navidrome/navidrome-normalize.ts index 47819e928..17b742267 100644 --- a/src/shared/api/navidrome/navidrome-normalize.ts +++ b/src/shared/api/navidrome/navidrome-normalize.ts @@ -180,9 +180,11 @@ const normalizeSong = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || 'unknown', _serverType: ServerType.NAVIDROME, + albumCount: null, id: genre.id, imageUrl: null, name: genre.name, + songCount: null, })), id, imagePlaceholderUrl, @@ -298,9 +300,11 @@ const normalizeAlbum = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || 'unknown', _serverType: ServerType.NAVIDROME, + albumCount: null, id: genre.id, imageUrl: null, name: genre.name, + songCount: null, })), id: item.id, imagePlaceholderUrl, @@ -378,9 +382,11 @@ const normalizeAlbumArtist = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || 'unknown', _serverType: ServerType.NAVIDROME, + albumCount: null, id: genre.id, imageUrl: null, name: genre.name, + songCount: null, })), id: item.id, imageUrl: imageUrl || null, @@ -444,11 +450,11 @@ const normalizeGenre = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || 'unknown', _serverType: ServerType.NAVIDROME, - albumCount: undefined, + albumCount: null, id: item.id, imageUrl: null, name: item.name, - songCount: undefined, + songCount: null, }; }; diff --git a/src/shared/api/subsonic/subsonic-normalize.ts b/src/shared/api/subsonic/subsonic-normalize.ts index 4d07f1bcf..ab294bb31 100644 --- a/src/shared/api/subsonic/subsonic-normalize.ts +++ b/src/shared/api/subsonic/subsonic-normalize.ts @@ -101,9 +101,11 @@ const getGenres = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || 'unknown', _serverType: ServerType.SUBSONIC, + albumCount: null, id: genre.name, imageUrl: null, name: genre.name, + songCount: null, })) : item.genre ? [ @@ -111,9 +113,11 @@ const getGenres = ( _itemType: LibraryItem.GENRE, _serverId: server?.id || 'unknown', _serverType: ServerType.SUBSONIC, + albumCount: null, id: item.genre, imageUrl: null, name: item.genre, + songCount: null, }, ] : []; diff --git a/src/shared/types/domain-types.ts b/src/shared/types/domain-types.ts index 8fdd01a03..65e664467 100644 --- a/src/shared/types/domain-types.ts +++ b/src/shared/types/domain-types.ts @@ -265,11 +265,11 @@ export type Genre = { _itemType: LibraryItem.GENRE; _serverId: string; _serverType: ServerType; - albumCount?: number; + albumCount: null | number; id: string; imageUrl: null | string; name: string; - songCount?: number; + songCount: null | number; }; export type GenreListArgs = BaseEndpointArgs & { query: GenreListQuery };