feat(participants): add DisplayName method to prioritize CreditedAs over Name

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2026-05-24 20:01:45 -03:00
commit 03b8b15f6e
2 changed files with 6 additions and 11 deletions

View file

@ -81,6 +81,10 @@ type Participant struct {
CreditedAs string `json:"creditedAs,omitempty"`
}
func (p Participant) DisplayName() string {
return cmp.Or(p.CreditedAs, p.Name)
}
type ParticipantList []Participant
func (p ParticipantList) Join(sep string) string {