sessions

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackMsg

type BackMsg struct{}

BackMsg signals leaving the sessions screen.

type KeyMap

type KeyMap struct {
	Enter    key.Binding
	Back     key.Binding
	PageUp   key.Binding
	PageDown key.Binding
}

KeyMap defines sessions screen bindings.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns default sessions bindings.

type LoadedMsg

type LoadedMsg struct {
	Target   Target
	Sessions []abs.ListeningSession
	Total    int
	Err      error
}

LoadedMsg carries the sessions of a target.

type Model

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

Model is the Bubble Tea model for the sessions screen.

func New

func New(styles ui.Styles, client *cache.Client, target Target, deviceID string) Model

New creates a sessions screen model. deviceID is the device ID of this pine, which marks the sessions of this device.

func (Model) HasActiveFilter

func (m Model) HasActiveFilter() bool

HasActiveFilter reports whether a filter is typed or applied.

func (Model) Init

func (m Model) Init() tea.Cmd

Init starts loading the sessions.

func (Model) IsFiltering

func (m Model) IsFiltering() bool

IsFiltering reports whether the filter input is active.

func (*Model) SetSize

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

SetSize updates the screen size.

func (Model) Update

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

Update handles sessions screen messages.

func (Model) View

func (m Model) View() string

View renders the sessions screen.

type PlayFromMsg

type PlayFromMsg struct {
	ItemID    string
	EpisodeID string
	Position  float64
}

PlayFromMsg requests playback of an item or an episode from a position.

type Target

type Target struct {
	ItemID    string
	EpisodeID string
	Title     string
}

Target is the book or the podcast episode whose sessions the screen shows. The zero Target shows the sessions of all items.

Jump to

Keyboard shortcuts

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