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

detail

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 AddBookmarkCmd

type AddBookmarkCmd struct {
	Item abs.LibraryItem
}

AddBookmarkCmd requests adding a bookmark at the current playback position.

type AddToQueueCmd

type AddToQueueCmd struct {
	Item    abs.LibraryItem
	Episode *abs.PodcastEpisode
}

AddToQueueCmd requests appending the item or selected episode to the queue.

type BackMsg

type BackMsg struct{}

BackMsg signals that the user wants to go back from the detail screen.

type BookmarksUpdatedMsg

type BookmarksUpdatedMsg struct {
	ItemID    string
	Bookmarks []abs.Bookmark
	Err       error
}

BookmarksUpdatedMsg updates the bookmark list after a load or an add/delete operation. ItemID is the item of the bookmarks: the answer for an item can come after the user opened a different item.

type DeleteBookmarkCmd

type DeleteBookmarkCmd struct {
	ItemID   string
	Bookmark abs.Bookmark
}

DeleteBookmarkCmd requests deletion of a bookmark.

type DeleteEpisodeCmd added in v0.4.0

type DeleteEpisodeCmd struct {
	ItemID    string
	EpisodeID string
}

DeleteEpisodeCmd requests deletion of an episode from the server.

type DeleteItemCmd added in v0.4.0

type DeleteItemCmd struct {
	ItemID string
}

DeleteItemCmd requests deletion of the item from the server.

type EditMetadataCmd added in v0.3.0

type EditMetadataCmd struct {
	Item    abs.LibraryItem
	Episode *abs.PodcastEpisode
}

EditMetadataCmd requests opening the metadata editor for the current item.

type EpisodeDeletedMsg added in v0.4.0

type EpisodeDeletedMsg struct {
	ItemID    string
	EpisodeID string
}

EpisodeDeletedMsg signals the episode was successfully deleted.

type ItemDeletedMsg added in v0.4.0

type ItemDeletedMsg struct {
	ItemID string
}

ItemDeletedMsg signals the item was successfully deleted.

type KeyMap

type KeyMap struct {
	Play         key.Binding
	Bookmark     key.Binding
	Up           key.Binding
	Down         key.Binding
	Back         key.Binding
	Enter        key.Binding
	Delete       key.Binding
	DeleteItem   key.Binding
	Edit         key.Binding
	ToggleFocus  key.Binding
	MarkFinished key.Binding
	AddToQueue   key.Binding
	PlayNext     key.Binding
	Metadata     key.Binding
}

KeyMap defines keybindings for the detail screen.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default keybindings for the detail screen.

type MarkFinishedCmd

type MarkFinishedCmd struct {
	Item    abs.LibraryItem
	Episode *abs.PodcastEpisode
	Undo    bool
}

MarkFinishedCmd requests marking an item as finished or undoing that.

type MarkFinishedMsg

type MarkFinishedMsg struct {
	Progress *abs.UserMediaProgress
}

MarkFinishedMsg updates the item after marking it finished.

type Model

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

Model is the bubbletea model for the detail screen.

func New

func New(styles ui.Styles, item abs.LibraryItem) Model

New creates a new detail screen model for the given library item.

func (Model) BookmarkEditError

func (m Model) BookmarkEditError() string

BookmarkEditError returns the current bookmark edit validation error.

func (Model) BookmarkLoadError

func (m Model) BookmarkLoadError() error

BookmarkLoadError returns the last bookmark load error, if any.

func (Model) Bookmarks

func (m Model) Bookmarks() []abs.Bookmark

Bookmarks returns the current bookmark list.

func (Model) BookmarksLoaded

func (m Model) BookmarksLoaded() bool

BookmarksLoaded returns whether bookmark loading has completed.

func (Model) ConfirmOverlayView added in v0.4.0

func (m Model) ConfirmOverlayView() string

ConfirmOverlayView returns the active confirm overlay if any.

func (Model) ConfirmOverlayVisible added in v0.4.0

func (m Model) ConfirmOverlayVisible() bool

ConfirmOverlayVisible returns whether the confirm overlay is currently visible.

func (Model) EditingBookmark

func (m Model) EditingBookmark() bool

EditingBookmark returns whether bookmark title editing is active.

func (Model) Episodes

func (m Model) Episodes() []abs.PodcastEpisode

Episodes returns the podcast episodes.

func (Model) FocusBookmarks

func (m Model) FocusBookmarks() bool

FocusBookmarks returns whether bookmark navigation is focused.

func (Model) FocusSeries

func (m Model) FocusSeries() bool

FocusSeries returns whether the series row is focused.

func (Model) Init

func (m Model) Init() tea.Cmd

Init returns the initial command (none needed).

func (Model) Item

func (m Model) Item() abs.LibraryItem

Item returns the library item being displayed.

func (Model) ItemID

func (m Model) ItemID() string

ItemID returns the ID of the displayed library item.

func (Model) MetadataEditTarget added in v0.3.0

func (m Model) MetadataEditTarget() (abs.LibraryItem, *abs.PodcastEpisode, bool)

MetadataEditTarget returns the book or selected podcast episode editable by the metadata editor.

func (Model) SelectedBookmark

func (m Model) SelectedBookmark() int

SelectedBookmark returns the currently selected bookmark index.

func (Model) SelectedEpisode

func (m Model) SelectedEpisode() int

SelectedEpisode returns the currently selected episode index.

func (Model) SelectedPaletteActions added in v0.2.0

func (m Model) SelectedPaletteActions() []components.PaletteItem

func (*Model) SetBookmarks

func (m *Model) SetBookmarks(bookmarks []abs.Bookmark)

SetBookmarks updates the bookmark list and refreshes the viewport content.

func (*Model) SetEpisodes

func (m *Model) SetEpisodes(episodes []abs.PodcastEpisode)

SetEpisodes updates the episode list and refreshes the viewport content.

func (*Model) SetItem

func (m *Model) SetItem(item abs.LibraryItem)

SetItem updates the displayed item and refreshes the viewport content.

func (*Model) SetSize

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

SetSize updates the terminal dimensions for the detail screen.

func (Model) Update

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

Update handles messages for the detail screen.

func (Model) View

func (m Model) View() string

View renders the detail screen.

type NavigateSeriesMsg struct {
	LibraryID     string
	SeriesID      string
	CurrentItemID string
}

NavigateSeriesMsg requests opening the current book's series list.

type PlayCmd

type PlayCmd struct {
	Item abs.LibraryItem
}

PlayCmd requests playback of the given library item.

type PlayEpisodeCmd

type PlayEpisodeCmd struct {
	Item    abs.LibraryItem
	Episode abs.PodcastEpisode
}

PlayEpisodeCmd requests playback of a specific podcast episode.

type PlayNextCmd

type PlayNextCmd struct {
	Item    abs.LibraryItem
	Episode *abs.PodcastEpisode
}

PlayNextCmd requests inserting the item or selected episode at the front of the queue.

type SeekToBookmarkCmd

type SeekToBookmarkCmd struct {
	Item  abs.LibraryItem
	Time  float64
	Title string
}

SeekToBookmarkCmd requests seeking the player to a bookmark's timestamp. The root model finds the episode of a podcast bookmark from Title.

type SeekToChapterCmd

type SeekToChapterCmd struct {
	Time float64
}

SeekToChapterCmd requests seeking the player to a chapter's start time.

type ShowDeleteConfirmMsg added in v0.4.0

type ShowDeleteConfirmMsg struct {
	Target string // "delete_item" or "delete_episode"
}

ShowDeleteConfirmMsg requests the UI to show the delete confirmation dialog.

type UpdateBookmarkCmd

type UpdateBookmarkCmd struct {
	ItemID   string
	Bookmark abs.Bookmark
	Title    string
}

UpdateBookmarkCmd requests updating a bookmark title.

Jump to

Keyboard shortcuts

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