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

home

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: 12 Imported by: 0

Documentation

Index

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 GoBackMsg

type GoBackMsg struct{}

GoBackMsg requests navigating back from the home screen.

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 New

func New(styles ui.Styles, client *cache.Client) Model

New creates a new home screen model.

func (Model) Error

func (m Model) Error() error

Error returns the last error, if any.

func (Model) HasActiveFilter added in v0.5.0

func (m Model) HasActiveFilter() bool

func (Model) Init

func (m Model) Init() tea.Cmd

Init returns the initial command that fetches personalized data.

func (*Model) InvalidateLibrary added in v0.3.0

func (m *Model) InvalidateLibrary(libraryID string)

InvalidateLibrary is a no-op for the home screen; kept for interface parity.

func (Model) IsFiltering added in v0.5.0

func (m Model) IsFiltering() bool

func (Model) Items

func (m Model) Items() []abs.LibraryItem

Items returns the current library items.

func (Model) Libraries

func (m Model) Libraries() []abs.Library

Libraries returns the available libraries.

func (Model) Loading

func (m Model) Loading() bool

Loading returns whether data is being fetched.

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

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

ReloadCmd forces a fresh data fetch for the current library.

func (*Model) RemoveEpisode added in v0.4.0

func (m *Model) RemoveEpisode(itemID, episodeID string)

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

func (m *Model) RemoveItem(itemID string)

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

func (m Model) SelectedLibraryID() string

SelectedLibraryID returns the ID of the currently selected library, or empty string.

func (Model) SelectedLibraryMediaType

func (m Model) SelectedLibraryMediaType() string

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

func (*Model) SetSize

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

SetSize updates the terminal dimensions for the home screen.

func (Model) Update

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

Update handles messages for the home screen.

func (Model) View

func (m Model) View() string

View renders the home screen.

type NavigateDetailMsg struct {
	Item abs.LibraryItem
}

NavigateDetailMsg requests navigation to the detail screen for an item.

type NavigateLibraryMsg struct {
	LibraryID string
	Libraries []abs.Library
}

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.

Jump to

Keyboard shortcuts

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