player

package
v0.0.0-...-40e63e7 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatePlay    string = "play"
	StateStop    string = "stop"
	StatePause   string = "pause"
	StateUnknown string = "unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	spotify.PlayerState

	CreateTime         time.Time
	ProgressPercentage float64
	TrackRow           list.Row
	// contains filtered or unexported fields
}

State contains information about MPD's player status.

func NewState

func NewState(state spotify.PlayerState) *State

func (*State) ClearLiked

func (p *State) ClearLiked()

func (*State) Invalidate

func (p *State) Invalidate()

func (State) Liked

func (p State) Liked() bool

func (*State) LikedIsKnown

func (p *State) LikedIsKnown() bool

func (*State) SetLiked

func (p *State) SetLiked(b bool)

func (*State) SetTime

func (p *State) SetTime()

func (*State) Since

func (p *State) Since() time.Duration

func (*State) State

func (p *State) State() string

func (*State) Tick

func (p *State) Tick()

func (*State) Update

func (p *State) Update(state spotify.PlayerState)

Jump to

Keyboard shortcuts

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