Documentation ¶
Index ¶
- type Track
- func (track *Track) Album() string
- func (track *Track) Artist() string
- func (track *Track) Artists() string
- func (track *Track) CloseWS()
- func (track *Track) CoverURL() string
- func (track *Track) Download() (stream io.ReadCloser, err error)
- func (track *Track) Duration() int
- func (track *Track) Href() string
- func (track *Track) ID() string
- func (track *Track) ISRC() string
- func (track *Track) InitWS()
- func (track *Track) IsRadio() bool
- func (track *Track) PlayID() string
- func (track *Track) Populate() error
- func (track *Track) SpotifyURI() string
- func (track *Track) Stream() (common.Stream, error)
- func (track *Track) Title() string
- func (track *Track) WaitForTrackUpdate() chan common.TrackMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Track ¶
type Track struct {
// contains filtered or unexported fields
}
Track is a track from radio sources
func (*Track) Artist ¶
Artist returns the artist's name of currently playing track on radio, if known
func (*Track) Artists ¶
Artists returns the artist's name of currently playing track on radio, if known
func (*Track) CoverURL ¶
CoverURL returns the URL to the cover of currently playing track on radio, if known
func (*Track) Download ¶
func (track *Track) Download() (stream io.ReadCloser, err error)
Download returns an mp3 stream to the radio
func (*Track) Duration ¶
Duration returns the duration of currently playing track on radio, if known, otherwise, 0
func (*Track) ID ¶
ID returns the ID number of currently playing track on radio, if known, otherwise, returns 0
func (*Track) InitWS ¶
func (track *Track) InitWS()
InitWS starts a thread to receive track info from radio
func (*Track) SpotifyURI ¶
SpotifyURI returns the currently playing track's equivalent spotify song, if known
func (*Track) Title ¶
Title returns the title of currently playing track on radio, if known, otherwise, returns the radio's name
func (*Track) WaitForTrackUpdate ¶
func (track *Track) WaitForTrackUpdate() chan common.TrackMetadata
WaitForTrackUpdate waits until a new track update event from WS broadcast