Documentation
¶
Index ¶
- type BackMsg
- type EditMetadataMsg
- type KeyMap
- type Model
- func (m *Model) Cleanup()
- func (m *Model) CurrentAuthors() []string
- func (m *Model) CurrentItemID() string
- func (m *Model) CurrentTitle() string
- func (m *Model) HasActiveItem() bool
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsPaused() bool
- func (m *Model) IsPlaying() bool
- func (m *Model) PlayerDuration() float64
- func (m *Model) PlayerPosition() float64
- func (m *Model) PlayerSpeed() float64
- func (m *Model) PlayerVolume() int
- func (m *Model) QueueLength() int
- func (m *Model) SetProgram(p *tea.Program)
- func (m *Model) SetSize(width, height int)
- func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) View() string
- type MprisState
- func (s *MprisState) CanGoNext() bool
- func (s *MprisState) CanGoPrevious() bool
- func (s *MprisState) CanSeek() bool
- func (s *MprisState) CurrentAuthors() []string
- func (s *MprisState) CurrentItemID() string
- func (s *MprisState) CurrentTitle() string
- func (s *MprisState) HasActiveItem() bool
- func (s *MprisState) IsPaused() bool
- func (s *MprisState) IsPlaying() bool
- func (s *MprisState) PlayerDuration() float64
- func (s *MprisState) PlayerMaximumRate() float64
- func (s *MprisState) PlayerMinimumRate() float64
- func (s *MprisState) PlayerPosition() float64
- func (s *MprisState) PlayerSpeed() float64
- func (s *MprisState) PlayerVolume() int
- func (s *MprisState) QueueLength() int
- func (s *MprisState) Update(fn func(s *MprisState))
- type NavigateMsg
- type Screen
- type SleepTimerExpiredMsg
- type SwitchScreenMsg
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 (*Model) CurrentAuthors ¶
func (*Model) CurrentItemID ¶
func (*Model) CurrentTitle ¶
func (*Model) HasActiveItem ¶
func (*Model) PlayerDuration ¶
func (*Model) PlayerPosition ¶
func (*Model) PlayerSpeed ¶
func (*Model) PlayerVolume ¶
func (*Model) QueueLength ¶
func (*Model) SetProgram ¶
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 ¶
type NavigateMsg struct {
}
NavigateMsg requests navigation to a different screen, pushing the current one onto the back stack.
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.