tracker

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control uint
const (
	PLAY Control = iota
	PAUSE
	STOP
	NEXT
	PREV
	LIKE
	REWIND
	VOLUME
	CACHE_TRACK
	BUFFERING_COMPLETE
	TOGGLE_LYRICS
	TOGGLE_VIEW
)

type Model

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

func New

func New(p *tea.Program, likesMap *map[string]bool) *Model

func (*Model) CurrentTrack

func (m *Model) CurrentTrack() *api.Track

func (*Model) Height

func (m *Model) Height() int

func (*Model) HideError

func (m *Model) HideError()

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) IsPlaying

func (m *Model) IsPlaying() bool

func (*Model) IsStoped

func (m *Model) IsStoped() bool

func (*Model) Pause

func (m *Model) Pause()

func (*Model) Play

func (m *Model) Play()

func (*Model) Position

func (m *Model) Position() time.Duration

func (*Model) Progress

func (m *Model) Progress() float64

func (*Model) Rewind

func (m *Model) Rewind(amount time.Duration) tea.Cmd

func (*Model) SetLirycs

func (m *Model) SetLirycs(show bool)

func (*Model) SetPos

func (m *Model) SetPos(pos time.Duration)

func (*Model) SetVolume

func (m *Model) SetVolume(v float64)

func (*Model) SetWidth

func (m *Model) SetWidth(width int)

func (*Model) ShowError

func (m *Model) ShowError(text string)

func (*Model) StartTrack

func (m *Model) StartTrack(track *api.Track, reader *stream.BufferedStream, lyrics []api.LyricPair)

func (*Model) Stop

func (m *Model) Stop()

func (*Model) TrackBuffer

func (m *Model) TrackBuffer() *stream.BufferedStream

func (*Model) Update

func (m *Model) Update(message tea.Msg) (*Model, tea.Cmd)

func (*Model) View

func (m *Model) View() string

func (*Model) Volume

func (m *Model) Volume() float64

func (*Model) Width

func (m *Model) Width() int

type ProgressControl

type ProgressControl float64

func (ProgressControl) Value

func (p ProgressControl) Value() float64

Jump to

Keyboard shortcuts

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