Documentation
¶
Index ¶
- type MpdClient
- func (c *MpdClient) AddSong(song string) error
- func (c *MpdClient) ClearPlaylist() error
- func (c *MpdClient) CurrentSong() (string, error)
- func (c *MpdClient) GetAllSongs() ([]mpd.Attrs, error)
- func (c *MpdClient) GetPlaylist() ([]mpd.Attrs, error)
- func (c *MpdClient) GetRandomSong() (string, error)
- func (c *MpdClient) GetState() string
- func (c *MpdClient) GetStatus() (mpdStatus, error)
- func (c *MpdClient) Next() error
- func (c *MpdClient) Play(pos int) error
- func (c *MpdClient) Previous() error
- func (c *MpdClient) SearchInLibrary(search string) ([]rankItem, error)
- func (c *MpdClient) Update() error
- type QueueHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MpdClient ¶
type MpdClient struct {
// contains filtered or unexported fields
}
func (*MpdClient) ClearPlaylist ¶
func (*MpdClient) CurrentSong ¶
func (*MpdClient) GetAllSongs ¶
GetAllSongs returns all songs in MPD library
func (*MpdClient) GetRandomSong ¶
GetRandomSong returns random song from mpd library
func (*MpdClient) SearchInLibrary ¶
type QueueHandler ¶
type QueueHandler struct {
Client client
// contains filtered or unexported fields
}
func NewQueueHandler ¶
func NewQueueHandler(c client, s statistics.Storage) *QueueHandler
TODO: load saved state?
func (*QueueHandler) AddToQueue ¶
func (q *QueueHandler) AddToQueue(user string, title string, file string) (queueItem, error)
AddToQueue adds song to user queue, will return error if already queued
func (*QueueHandler) HandlePlaylist ¶
func (q *QueueHandler) HandlePlaylist(addr, pw string) (err error)
TODO: Move handlePlaylist and ququeNextSong(remove it?) to mpd.go instead. Handle mpd playlist and add new songs from queue
func (*QueueHandler) StartQueue ¶
func (q *QueueHandler) StartQueue()
StartQueue starts up the queue, if mpd is stopped.
func (*QueueHandler) ToggleAutodj ¶
func (q *QueueHandler) ToggleAutodj(u string) (bool, error)
Click to show internal directories.
Click to hide internal directories.