1
0

Renamed Song() method to more clear name SongName().

This commit is contained in:
Alexander Andreev 2022-08-31 00:52:50 +04:00
parent fb891c5603
commit 73fc9861fd
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -39,7 +39,7 @@ type IcecastStatusDTO struct {
} `json:"icestats"` } `json:"icestats"`
} }
func (is *IcecastStatusDTO) Song() string { func (is *IcecastStatusDTO) SongName() string {
return is.Icestats.Source.Artist + " - " + is.Icestats.Source.Title return is.Icestats.Source.Artist + " - " + is.Icestats.Source.Title
} }
@ -72,7 +72,7 @@ func IcecastGetStatus(icecastURL string) (*IcecastStatus, error) {
return &IcecastStatus{ return &IcecastStatus{
ServerStartISO8601: iceStatDTO.Icestats.ServerStartISO8601, ServerStartISO8601: iceStatDTO.Icestats.ServerStartISO8601,
ServerStartDate: iceStatDTO.Icestats.ServerStartDate, ServerStartDate: iceStatDTO.Icestats.ServerStartDate,
SongName: iceStatDTO.Song(), SongName: iceStatDTO.SongName(),
ListenerPeak: iceStatDTO.Icestats.Source.ListenerPeak, ListenerPeak: iceStatDTO.Icestats.Source.ListenerPeak,
Listeners: iceStatDTO.Icestats.Source.Listeners, Listeners: iceStatDTO.Icestats.Source.Listeners,
}, nil }, nil