add multiple genre support for nd albums/tracks

This commit is contained in:
Kendall Garner 2025-09-28 19:59:20 -07:00
parent 6df270ba34
commit 4a48598260
No known key found for this signature in database
GPG key ID: 9355F387FE765C94
4 changed files with 77 additions and 20 deletions

View file

@ -271,6 +271,10 @@ export const NavidromeController: ControllerEndpoint = {
getAlbumList: async (args) => {
const { apiClientProps, query } = args;
const genres = hasFeature(apiClientProps.server, ServerFeature.BFR)
? query.genres
: query.genres?.[0];
const res = await ndApiClient(apiClientProps).getAlbumList({
query: {
_end: query.startIndex + (query.limit || 0),
@ -279,7 +283,7 @@ export const NavidromeController: ControllerEndpoint = {
_start: query.startIndex,
artist_id: query.artistIds?.[0],
compilation: query.compilation,
genre_id: query.genres?.[0],
genre_id: genres,
name: query.searchTerm,
...query._custom?.navidrome,
starred: query.favorite,