fix: normalize artists with no album count

This commit is contained in:
Kendall Garner 2025-03-10 14:20:19 -07:00
parent 41c2a7da69
commit 1555b827ee
No known key found for this signature in database
GPG key ID: 9355F387FE765C94

View file

@ -279,7 +279,7 @@ const normalizeAlbumArtist = (
}
return {
albumCount: item.stats?.albumartist.albumCount || item.albumCount,
albumCount: item.stats?.albumartist?.albumCount || item.albumCount,
backgroundImageUrl: null,
biography: item.biography || null,
duration: null,
@ -304,7 +304,7 @@ const normalizeAlbumArtist = (
imageUrl: artist?.artistImageUrl || null,
name: artist.name,
})) || null,
songCount: item.stats?.albumartist.songCount || item.songCount,
songCount: item.stats?.albumartist?.songCount || item.songCount,
userFavorite: item.starred,
userRating: item.rating,
};