Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackMsg

type BackMsg struct{}

BackMsg requests navigation back to the previous screen on the back stack.

type EditMetadataMsg

type EditMetadataMsg struct {
	ItemID   string
	ItemType string // "Track" or "Album"
	Track    *jellyfin.Track
	Album    *jellyfin.Album
}

EditMetadataMsg requests opening the metadata editor for a track or album.

type KeyMap

type KeyMap struct {
	Quit          key.Binding
	Back          key.Binding
	Help          key.Binding
	NextTrack     key.Binding
	PrevTrack     key.Binding
	Shuffle       key.Binding
	RepeatTrack   key.Binding
	RepeatQueue   key.Binding
	OpenPlaylists key.Binding
	GlobalPalette key.Binding
	SleepTimer    key.Binding
}

func DefaultKeyMap

func DefaultKeyMap(cfg config.KeybindsConfig) KeyMap

type Model

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

func New

func New(cfg *config.Config, mpv *player.Mpv) *Model

func (*Model) Cleanup

func (m *Model) Cleanup()

func (*Model) CurrentAuthors

func (m *Model) CurrentAuthors() []string

func (*Model) CurrentItemID

func (m *Model) CurrentItemID() string

func (*Model) CurrentTitle

func (m *Model) CurrentTitle() string

func (*Model) HasActiveItem

func (m *Model) HasActiveItem() bool

func (*Model) Init

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

func (*Model) IsPaused

func (m *Model) IsPaused() bool

func (*Model) IsPlaying

func (m *Model) IsPlaying() bool

func (*Model) PlayerDuration

func (m *Model) PlayerDuration() float64

func (*Model) PlayerPosition

func (m *Model) PlayerPosition() float64

func (*Model) PlayerSpeed

func (m *Model) PlayerSpeed() float64

func (*Model) PlayerVolume

func (m *Model) PlayerVolume() int

func (*Model) QueueLength

func (m *Model) QueueLength() int

func (*Model) SetProgram

func (m *Model) SetProgram(p *tea.Program)

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

View composes the header, error banner, active screen, hints, and player footer into a single string, then places it on the terminal canvas and overlays the command palette modal when visible.

type MprisState

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

MprisState holds playback state shared between the Model and MPRIS accessor. The Model writes to it via Update; the MPRIS adapter reads from it via the getter methods. All access is guarded by mu.

func (*MprisState) CanGoNext

func (s *MprisState) CanGoNext() bool

func (*MprisState) CanGoPrevious

func (s *MprisState) CanGoPrevious() bool

func (*MprisState) CanSeek

func (s *MprisState) CanSeek() bool

func (*MprisState) CurrentAuthors

func (s *MprisState) CurrentAuthors() []string

func (*MprisState) CurrentItemID

func (s *MprisState) CurrentItemID() string

func (*MprisState) CurrentTitle

func (s *MprisState) CurrentTitle() string

func (*MprisState) HasActiveItem

func (s *MprisState) HasActiveItem() bool

func (*MprisState) IsPaused

func (s *MprisState) IsPaused() bool

func (*MprisState) IsPlaying

func (s *MprisState) IsPlaying() bool

func (*MprisState) PlayerDuration

func (s *MprisState) PlayerDuration() float64

func (*MprisState) PlayerMaximumRate

func (s *MprisState) PlayerMaximumRate() float64

func (*MprisState) PlayerMinimumRate

func (s *MprisState) PlayerMinimumRate() float64

func (*MprisState) PlayerPosition

func (s *MprisState) PlayerPosition() float64

func (*MprisState) PlayerSpeed

func (s *MprisState) PlayerSpeed() float64

func (*MprisState) PlayerVolume

func (s *MprisState) PlayerVolume() int

func (*MprisState) QueueLength

func (s *MprisState) QueueLength() int

func (*MprisState) Update

func (s *MprisState) Update(fn func(s *MprisState))

Update runs fn with the write lock held. fn must not call the getter methods on s (or any *MprisState that aliases the same receiver) to avoid deadlocks.

type NavigateMsg struct {
	Target Screen
}

NavigateMsg requests navigation to a different screen, pushing the current one onto the back stack.

type Screen

type Screen int
const (
	ScreenLogin Screen = iota
	ScreenLibrary
	ScreenPlaylists
	ScreenQueue
	ScreenMetadataEdit
)

func (Screen) String

func (s Screen) String() string

String returns a human-friendly name for the screen, used in the header.

type SleepTimerExpiredMsg

type SleepTimerExpiredMsg struct {
	Generation uint64
}

SleepTimerExpiredMsg fires when the sleep timer reaches zero.

type SwitchScreenMsg

type SwitchScreenMsg struct {
	Screen Screen
}

SwitchScreenMsg requests switching to a specific screen.

Jump to

Keyboard shortcuts

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