mpd

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT-0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyClosed = errors.New("MPDClient: already closed")
)

Functions

This section is empty.

Types

type MPDClient

type MPDClient struct {
	// contains filtered or unexported fields
}

func NewMPDClient

func NewMPDClient(net, addr, password string) *MPDClient

NewMPDClient returns a pointer to an instance of MPDClient. A password of "" can be used if there is no password.

func (*MPDClient) NowPlaying

func (c *MPDClient) NowPlaying() song.Song

func (*MPDClient) Pause

func (c *MPDClient) Pause()

func (*MPDClient) Ping added in v0.3.0

func (c *MPDClient) Ping()

func (*MPDClient) Play

func (c *MPDClient) Play()

func (*MPDClient) Start

func (c *MPDClient) Start() (err error)

func (*MPDClient) Status added in v0.3.0

func (c *MPDClient) Status() status.Status

func (*MPDClient) Stop

func (c *MPDClient) Stop() error

type MPDWatcher

type MPDWatcher struct {
	// contains filtered or unexported fields
}

func NewMPDWatcher

func NewMPDWatcher(net, addr, password string) *MPDWatcher

func (*MPDWatcher) PostEvents

func (w *MPDWatcher) PostEvents(postEvent func(tcell.Event) error, quit <-chan struct{})

func (*MPDWatcher) Start added in v0.4.0

func (w *MPDWatcher) Start() (err error)

func (*MPDWatcher) Stop added in v0.4.0

func (w *MPDWatcher) Stop() error

type Song

type Song map[string]string

func (Song) Album

func (s Song) Album() string

func (Song) Artist

func (s Song) Artist() string

func (Song) File

func (s Song) File() string

func (Song) ID

func (s Song) ID() string

func (Song) LRCFile

func (s Song) LRCFile() string

func (Song) Title

func (s Song) Title() string

type Status added in v0.3.0

type Status map[string]string

func (Status) Duration added in v0.3.0

func (s Status) Duration() time.Duration

func (Status) Elapsed added in v0.3.0

func (s Status) Elapsed() time.Duration

func (Status) State added in v0.3.0

func (s Status) State() state.State

Jump to

Keyboard shortcuts

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