Documentation
¶
Index ¶
- type AddToQueueMsg
- type GoBackMsg
- type KeyMap
- type Model
- func (m Model) Error() error
- func (m Model) HasActiveFilter() bool
- func (m Model) Init() tea.Cmd
- func (m *Model) InvalidateLibrary(libraryID string)
- func (m Model) IsFiltering() bool
- func (m Model) Items() []abs.LibraryItem
- func (m Model) Libraries() []abs.Library
- func (m Model) Loading() bool
- func (m Model) RecentlyAdded() []abs.LibraryItem
- func (m *Model) ReloadCmd() tea.Cmd
- func (m *Model) RemoveEpisode(itemID, episodeID string)
- func (m *Model) RemoveItem(itemID string)
- func (m *Model) ReplaceItem(updated abs.LibraryItem)
- func (m Model) SelectedLibraryID() string
- func (m Model) SelectedLibraryMediaType() string
- func (m Model) SelectedPaletteActions() []components.PaletteItem
- func (m *Model) SetSize(width, height int)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type NavigateDetailMsg
- type NavigateLibraryMsg
- type PersonalizedMsg
- type PlayEpisodeMsg
- type PlayMsg
- type PlayNextMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddToQueueMsg ¶
type AddToQueueMsg struct {
Item abs.LibraryItem
Episode *abs.PodcastEpisode
}
AddToQueueMsg requests appending the selected home item to the queue.
type KeyMap ¶
type KeyMap struct {
Enter key.Binding
Back key.Binding
Library key.Binding
NextLib key.Binding
PageUp key.Binding
PageDown key.Binding
Select key.Binding
AddToQueue key.Binding
PlayNext key.Binding
}
KeyMap defines keybindings for the home screen.
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
DefaultKeyMap returns the default keybindings for the home screen.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the bubbletea model for the home screen.
func (Model) HasActiveFilter ¶ added in v0.5.0
func (*Model) InvalidateLibrary ¶ added in v0.3.0
InvalidateLibrary is a no-op for the home screen; kept for interface parity.
func (Model) IsFiltering ¶ added in v0.5.0
func (Model) Items ¶
func (m Model) Items() []abs.LibraryItem
Items returns the current library items.
func (Model) RecentlyAdded ¶
func (m Model) RecentlyAdded() []abs.LibraryItem
RecentlyAdded returns the secondary recently added subsection items.
func (*Model) ReloadCmd ¶ added in v0.4.0
ReloadCmd forces a fresh data fetch for the current library.
func (*Model) RemoveEpisode ¶ added in v0.4.0
RemoveEpisode removes an episode from items, and drops the item entirely if it was featured as a recent episode.
func (*Model) RemoveItem ¶ added in v0.4.0
RemoveItem removes an item from visible items.
func (*Model) ReplaceItem ¶ added in v0.3.0
func (m *Model) ReplaceItem(updated abs.LibraryItem)
ReplaceItem updates matching visible items with fresh metadata.
func (Model) SelectedLibraryID ¶
SelectedLibraryID returns the ID of the currently selected library, or empty string.
func (Model) SelectedLibraryMediaType ¶
SelectedLibraryMediaType returns the media type of the current library, or empty string.
func (Model) SelectedPaletteActions ¶ added in v0.2.0
func (m Model) SelectedPaletteActions() []components.PaletteItem
type NavigateDetailMsg ¶
type NavigateDetailMsg struct {
}
NavigateDetailMsg requests navigation to the detail screen for an item.
type NavigateLibraryMsg ¶
type NavigateLibraryMsg struct {
}
NavigateLibraryMsg requests navigation to the library screen.
type PersonalizedMsg ¶
type PersonalizedMsg struct {
Items []abs.LibraryItem
RecentlyAdded []abs.LibraryItem
Libraries []abs.Library
LibraryID string
Err error
}
PersonalizedMsg carries the result of fetching personalized data.
type PlayEpisodeMsg ¶
type PlayEpisodeMsg struct {
Item abs.LibraryItem
Episode abs.PodcastEpisode
}
PlayEpisodeMsg requests direct playback of a podcast episode from the home screen.
type PlayMsg ¶
type PlayMsg struct {
Item abs.LibraryItem
}
PlayMsg requests direct playback of an audiobook from the home screen.
type PlayNextMsg ¶
type PlayNextMsg struct {
Item abs.LibraryItem
Episode *abs.PodcastEpisode
}
PlayNextMsg requests inserting the selected home item at the front of the queue.