Documentation ¶
Index ¶
- type Playlist
- type Radio
- func (r *Radio) GetNextSong() (*Track, error)
- func (r *Radio) GetPlaylistByName(name string) (*Playlist, error)
- func (r *Radio) GetTrackByHash(hash string) (*Track, error)
- func (r *Radio) Init() error
- func (r *Radio) InitTelnet() error
- func (r *Radio) NewDirectoryPlaylist(name string, path string) (*Playlist, error)
- func (r *Radio) NewPlaylist(name string) (*Playlist, error)
- func (r *Radio) PlayTrack(track *Track) error
- func (r *Radio) SkipSong() error
- func (r *Radio) StdPopulate() error
- func (r *Radio) UpdatePlaylistsRoutine()
- type Track
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Playlist ¶
type Playlist struct { Name string `json:"name"` Path string `json:"path"` CreationDate time.Time `json:"creation_date"` ModificationDate time.Time `json:"modification_date"` Status string `json:"status"` Stats struct { Tracks int `json:"tracks"` } `json:"stats"` Tracks map[string]*Track `json:"-"` }
func (*Playlist) AutoUpdate ¶
func (*Playlist) GetRandomTrack ¶
type Radio ¶
type Radio struct { Name string `json:"name"` DefaultPlaylist *Playlist `json:"default_playlist"` CreationDate time.Time `json:"creation_date"` ModificationDate time.Time `json:"modification_date"` Stats struct { Playlists int `json:"playlists"` Tracks int `json:"tracks"` } `json:"stats"` Playlists []*Playlist `json:"-"` Telnet *liquidsoap.Telnet `json:"-"` }
func (*Radio) GetNextSong ¶
func (*Radio) InitTelnet ¶
func (*Radio) NewDirectoryPlaylist ¶
func (*Radio) StdPopulate ¶
func (*Radio) UpdatePlaylistsRoutine ¶
func (r *Radio) UpdatePlaylistsRoutine()
type Track ¶
type Track struct { Hash string `json:"hash"` Status string `json:"status"` Title string `json:"title"` RelPath string `json:"relative_path"` Path string `json:"path"` FileName string `json:"file_name"` FileSize int64 `json:"file_size"` FileModTime time.Time `json:"file_modification_time"` CreationDate time.Time `json:"creation_date"` ModificationDate time.Time `json:"modification_date"` Playlists []*Playlist `json:"playlists"` Tag struct { Length time.Duration `json:"length"` Title string `json:"title"` Artist string `json:"artist"` Album string `json:"album"` Genre string `json:"genre"` Bitrate int `json:"bitrate"` Year int `json:"year"` Channels int `json:"channels"` } `json:"tag"` }
Click to show internal directories.
Click to hide internal directories.