feat(server): custom ArtistJoiner config (#3873)

* feat(server): custom ArtistJoiner config

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(ui): organize ArtistLinkField, add tests

Signed-off-by: Deluan <deluan@navidrome.org>

* feat(ui): use display artist

* feat(ui): use display artist

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan Quintão 2025-03-23 10:53:21 -04:00 committed by GitHub
parent 1c691ac0e6
commit 57e0f6d3ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 297 additions and 26 deletions

View file

@ -4,6 +4,7 @@ import (
"cmp"
"strings"
"github.com/navidrome/navidrome/conf"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/model"
"github.com/navidrome/navidrome/utils/str"
@ -210,8 +211,8 @@ func (md Metadata) getArtistValues(single, multi model.TagName) []string {
func (md Metadata) mapDisplayName(singularTagName, pluralTagName model.TagName) string {
return cmp.Or(
strings.Join(md.tags[singularTagName], consts.ArtistJoiner),
strings.Join(md.tags[pluralTagName], consts.ArtistJoiner),
strings.Join(md.tags[singularTagName], conf.Server.Scanner.ArtistJoiner),
strings.Join(md.tags[pluralTagName], conf.Server.Scanner.ArtistJoiner),
)
}