Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMaxRecent = 3
DefaultMaxRecent is the number of recently played tracks to remember for avoiding repetition in playlist generation
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages radios for all moods
func NewManager ¶
func NewManager(repo *inventory.Repository) *Manager
NewManager creates a new radio manager
func (*Manager) GetPlaylist ¶
GetPlaylist returns the playlist for a mood
func (*Manager) RecordPlay ¶
RecordPlay records a play for the mood's radio
type Radio ¶
type Radio struct {
// contains filtered or unexported fields
}
Radio manages playlist generation for a mood
func NewRadio ¶
func NewRadio(repo *inventory.Repository, mood string) *Radio
NewRadio creates a new radio for a mood
func (*Radio) GetPlaylist ¶
GetPlaylist returns a shuffled playlist for the mood. Recently played tracks are pushed to the end of the playlist.
func (*Radio) RecordPlay ¶
RecordPlay records that a track was played
Click to show internal directories.
Click to hide internal directories.