client

package
v0.0.0-...-68e3b61 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// only submit if played for submitTime second or submitPercentage of length
	SubmitTime        = 120 // 2 minutes
	SubmitPercentage  = 50  // 50%
	SubmitMinDuration = 30  // 30 seconds
	TitleHack         = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	SubmitTime        int
	SubmitPercentage  int
	SubmitMinDuration int
	TitleHack         bool
	// contains filtered or unexported fields
}

func Dial

func Dial(net, addr, pass string) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Song

func (c *Client) Song() Song

func (*Client) Watch

func (c *Client) Watch(interval time.Duration, toSubmit chan<- Song, nowPlaying chan<- Song)

type Song

type Song struct {
	Title       string
	Artist      string
	Album       string
	AlbumArtist string
	TrackNumber int32
	Duration    uint32
	Start       time.Time
}

Directories

Path Synopsis
Package mpd provides the client side interface to MPD (Music Player Daemon).
Package mpd provides the client side interface to MPD (Music Player Daemon).

Jump to

Keyboard shortcuts

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