artists fixes

This commit is contained in:
Kendall Garner 2025-04-25 09:30:17 -07:00
parent c376293f2f
commit 68759a2613
No known key found for this signature in database
GPG key ID: 9355F387FE765C94
6 changed files with 15 additions and 7 deletions

View file

@ -236,7 +236,6 @@ const normalizeAlbum = (
})),
id: item.Id,
imagePlaceholderUrl: null,
participants: null,
imageUrl: getAlbumCoverArtUrl({
baseUrl: server?.url || '',
item,
@ -248,6 +247,7 @@ const normalizeAlbum = (
mbzId: item.ProviderIds?.MusicBrainzAlbum || null,
name: item.Name,
originalDate: null,
participants: null,
playCount: item.UserData?.PlayCount || 0,
releaseDate: item.PremiereDate?.split('T')[0] || null,
releaseYear: item.ProductionYear || null,

View file

@ -287,7 +287,7 @@ export const NavidromeController: ControllerEndpoint = {
_start: query.startIndex,
name: query.searchTerm,
...query._custom?.navidrome,
role: query.role,
role: query.role || undefined,
},
});
@ -425,7 +425,8 @@ export const NavidromeController: ControllerEndpoint = {
};
},
getRandomSongList: SubsonicController.getRandomSongList,
getRoles: async () => NAVIDROME_ROLES,
getRoles: async ({ apiClientProps }) =>
hasFeature(apiClientProps.server, ServerFeature.BFR) ? NAVIDROME_ROLES : [],
getServerInfo: async (args) => {
const { apiClientProps } = args;

View file

@ -279,7 +279,10 @@ const normalizeAlbumArtist = (
}
return {
albumCount: item.stats?.albumartist?.albumCount || item.albumCount,
albumCount: Math.max(
item.stats?.albumartist?.albumCount || item.albumCount,
item.stats?.artist?.albumCount || 0,
),
backgroundImageUrl: null,
biography: item.biography || null,
duration: null,

View file

@ -503,6 +503,7 @@ export interface SongListQuery extends BaseQuery<SongListSort> {
maxYear?: number;
minYear?: number;
musicFolderId?: string;
role?: string;
searchTerm?: string;
startIndex: number;
}