Documentation
¶
Index ¶
- type Client
- func (c *Client) ClearError() error
- func (c *Client) Close() error
- func (c *Client) CurrentSong() (*CurrentSong, error)
- func (c *Client) Idle(subsystems string) ([]string, error)
- func (c *Client) Load(name string) error
- func (c *Client) Next() error
- func (c *Client) NoIdle() error
- func (c *Client) Pause(pause bool) error
- func (c *Client) Ping() error
- func (c *Client) Play(songpos int) error
- func (c *Client) PlayID(songid int) error
- func (c *Client) Previous() error
- func (c *Client) Request(format string, args ...interface{}) ([]string, error)
- func (c *Client) Stats() (*Stats, error)
- func (c *Client) Status() (*Status, error)
- func (c *Client) Stop() error
- type CurrentSong
- type Stats
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the MPD protocol
func (*Client) ClearError ¶
ClearError clears the current error message in status
func (*Client) CurrentSong ¶
func (c *Client) CurrentSong() (*CurrentSong, error)
CurrentSong displays the song info of the current song
func (*Client) Idle ¶
Idle waits until there is a noteworthy change in one or more of MPD’s subsystems While a client is waiting for idle results, the server disables timeouts, allowing a client to wait for events as long as mpd runs. Change events accumulate, even while the connection is not in “idle” mode, no events gets lost while the client is doing something else with the connection. If an event had already occurred since the last call, the new idle command will return immediately.
func (*Client) Load ¶
Load loads the playlist into the current queue Note: range [start:end] currently not supported
func (*Client) Play ¶
Play begins playing the playlist at song number songpos. If songpos equal -1, starts playing at the current position in the playlist: this is not documented in the protocol but successfully tested with MPD 0.19.0
func (*Client) PlayID ¶
PlayID begins playing the playlist at song number songpos. If songpos equal -1, starts playing at the current position in the playlist: this is not documented in the protocol but successfully tested with MPD 0.19.0
type CurrentSong ¶
type CurrentSong struct { Album string Artist string File string ID int Name string Pos int Time int Title string }
CurrentSong contains the song info returned by CurrentSong()