radio

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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 NewTrack

func NewTrack() (radio *Track)

NewTrack returns an initialized Radio.Track

func (*Track) Album

func (track *Track) Album() string

Album returns the album's name of currently playing track on radio, if known

func (*Track) Artist

func (track *Track) Artist() string

Artist returns the artist's name of currently playing track on radio, if known

func (*Track) Artists

func (track *Track) Artists() string

Artists returns the artist's name of currently playing track on radio, if known

func (*Track) CloseWS

func (track *Track) CloseWS()

CloseWS stops receiving track from radio

func (*Track) CoverURL

func (track *Track) CoverURL() string

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

func (track *Track) Duration() int

Duration returns the duration of currently playing track on radio, if known, otherwise, 0

func (*Track) Href added in v0.6.0

func (track *Track) Href() string

Href returns the track's link

func (*Track) ID

func (track *Track) ID() string

ID returns the ID number of currently playing track on radio, if known, otherwise, returns 0

func (*Track) ISRC

func (track *Track) ISRC() string

ISRC returns the track's ISRC ID

func (*Track) InitWS

func (track *Track) InitWS()

InitWS starts a thread to receive track info from radio

func (*Track) IsRadio added in v1.0.0

func (track *Track) IsRadio() bool

func (*Track) PlayID

func (track *Track) PlayID() string

PlayID returns 0

func (*Track) Populate

func (track *Track) Populate() error

Populate populates metadata for Download

func (*Track) SpotifyURI

func (track *Track) SpotifyURI() string

SpotifyURI returns the currently playing track's equivalent spotify song, if known

func (*Track) Stream added in v0.6.0

func (track *Track) Stream() (common.Stream, error)

Stream returns a 16/48 pcm stream of the track

func (*Track) Title

func (track *Track) Title() string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL