diff --git a/internal/radio/icecast.go b/internal/radio/icecast.go index d46c85f..566d893 100644 --- a/internal/radio/icecast.go +++ b/internal/radio/icecast.go @@ -22,6 +22,10 @@ type IcecastStatusDTO struct { } `json:"icestats"` } +func (is *IcecastStatusDTO) Song() string { + return fmt.Sprintf("%s - %s", is.Icestats.Source.Artist, is.Icestats.Source.Title) +} + type IcecastStatus struct { ServerStartISO8601 string `json:"server_start_iso8601"` ServerStartDate string `json:"server_start"` @@ -59,10 +63,6 @@ func IcecastGetStatus(icecastURL string) (*IcecastStatus, error) { return iceStat, nil } -func (is *IcecastStatusDTO) Song() string { - return fmt.Sprintf("%s - %s", is.Icestats.Source.Artist, is.Icestats.Source.Title) -} - func IcecastLastPlayedSongs(lastNSongs int, playlistPath string) []Song { songs := make([]Song, 0)