minor artist count fixes

This commit is contained in:
Kendall Garner
2025-05-07 19:53:23 -07:00
parent f03d88cd8c
commit 781d8055b5
6 changed files with 47 additions and 18 deletions
@@ -190,7 +190,7 @@ export const SubsonicController: ControllerEndpoint = {
return {
...ssNormalize.albumArtist(artist, apiClientProps.server, 300),
albums: artist.album.map((album) => ssNormalize.album(album, apiClientProps.server)),
albums: artist.album?.map((album) => ssNormalize.album(album, apiClientProps.server)),
similarArtists:
artistInfo?.similarArtist?.map((artist) =>
ssNormalize.albumArtist(artist, apiClientProps.server, 300),
@@ -305,7 +305,7 @@ export const SubsonicController: ControllerEndpoint = {
return [];
}
return artist.body.artist.album;
return artist.body.artist.album ?? [];
});
return {
@@ -966,7 +966,7 @@ export const SubsonicController: ControllerEndpoint = {
return [];
}
return artist.body.artist.album;
return artist.body.artist.album ?? [];
});
const albumIds = albums.map((album) => album.id);