Documentation
¶
Index ¶
- type AddBookmarkCmd
- type AddToQueueCmd
- type BackMsg
- type BookmarksUpdatedMsg
- type DeleteBookmarkCmd
- type DeleteEpisodeCmd
- type DeleteItemCmd
- type EditMetadataCmd
- type EpisodeDeletedMsg
- type ItemDeletedMsg
- type KeyMap
- type MarkFinishedCmd
- type MarkFinishedMsg
- type Model
- func (m Model) BookmarkEditError() string
- func (m Model) BookmarkLoadError() error
- func (m Model) Bookmarks() []abs.Bookmark
- func (m Model) BookmarksLoaded() bool
- func (m Model) ConfirmOverlayView() string
- func (m Model) ConfirmOverlayVisible() bool
- func (m Model) EditingBookmark() bool
- func (m Model) Episodes() []abs.PodcastEpisode
- func (m Model) FocusBookmarks() bool
- func (m Model) FocusSeries() bool
- func (m Model) Init() tea.Cmd
- func (m Model) Item() abs.LibraryItem
- func (m Model) ItemID() string
- func (m Model) MetadataEditTarget() (abs.LibraryItem, *abs.PodcastEpisode, bool)
- func (m Model) SelectedBookmark() int
- func (m Model) SelectedEpisode() int
- func (m Model) SelectedPaletteActions() []components.PaletteItem
- func (m *Model) SetBookmarks(bookmarks []abs.Bookmark)
- func (m *Model) SetEpisodes(episodes []abs.PodcastEpisode)
- func (m *Model) SetItem(item abs.LibraryItem)
- func (m *Model) SetSize(width, height int)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type NavigateSeriesMsg
- type PlayCmd
- type PlayEpisodeCmd
- type PlayNextCmd
- type SeekToBookmarkCmd
- type SeekToChapterCmd
- type ShowDeleteConfirmMsg
- type UpdateBookmarkCmd
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 ¶
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 ¶
DeleteBookmarkCmd requests deletion of a bookmark.
type DeleteEpisodeCmd ¶ added in v0.4.0
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
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 ¶
BookmarkEditError returns the current bookmark edit validation error.
func (Model) BookmarkLoadError ¶
BookmarkLoadError returns the last bookmark load error, if any.
func (Model) BookmarksLoaded ¶
BookmarksLoaded returns whether bookmark loading has completed.
func (Model) ConfirmOverlayView ¶ added in v0.4.0
ConfirmOverlayView returns the active confirm overlay if any.
func (Model) ConfirmOverlayVisible ¶ added in v0.4.0
ConfirmOverlayVisible returns whether the confirm overlay is currently visible.
func (Model) EditingBookmark ¶
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 ¶
FocusBookmarks returns whether bookmark navigation is focused.
func (Model) FocusSeries ¶
FocusSeries returns whether the series row is focused.
func (Model) Item ¶
func (m Model) Item() abs.LibraryItem
Item returns the library item being displayed.
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 ¶
SelectedBookmark returns the currently selected bookmark index.
func (Model) SelectedEpisode ¶
SelectedEpisode returns the currently selected episode index.
func (Model) SelectedPaletteActions ¶ added in v0.2.0
func (m Model) SelectedPaletteActions() []components.PaletteItem
func (*Model) SetBookmarks ¶
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.
type NavigateSeriesMsg ¶
type NavigateSeriesMsg struct {
}
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.