mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-08 03:08:50 +01:00
feat(participants): add DisplayName method to prioritize CreditedAs over Name
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
a859804fd4
commit
03b8b15f6e
2 changed files with 6 additions and 11 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue