mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
refactor(participants): use DisplayName in JoinCredited
This commit is contained in:
parent
57785255bf
commit
7d601029c9
@ -100,10 +100,7 @@ func (p ParticipantList) Join(sep string) string {
|
||||
// Falls back to Name when CreditedAs is empty.
|
||||
func (p ParticipantList) JoinCredited(sep string) string {
|
||||
return strings.Join(slice.Map(p, func(part Participant) string {
|
||||
n := part.CreditedAs
|
||||
if n == "" {
|
||||
n = part.Name
|
||||
}
|
||||
n := part.DisplayName()
|
||||
if part.SubRole != "" {
|
||||
return n + " (" + part.SubRole + ")"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user