ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadPoster

func DownloadPoster(plexURL, thumbPath, token string) string

DownloadPoster downloads the poster image and returns the local path

func IsAvailable

func IsAvailable(fzfPath string) bool

IsAvailable checks if fzf is available on the system

func Logo(version string)

Logo prints a styled ASCII art logo with version information

func PluralizeItems added in v0.2.0

func PluralizeItems(count int) string

PluralizeItems returns "1 item" or "N items" based on count

func PromptAction

func PromptAction(fzfPath string) (string, error)

PromptAction asks the user what action to take

func PromptActionWithQueue added in v0.2.0

func PromptActionWithQueue(fzfPath string, queueCount int) (string, error)

PromptActionWithQueue asks the user what action to take, showing queue count

func PromptQueueAction added in v0.2.0

func PromptQueueAction(fzfPath string, queueCount int) (string, error)

PromptQueueAction shows queue management options

func SelectMedia

func SelectMedia(media []plex.MediaItem, prompt string, fzfPath string) (*plex.MediaItem, error)

SelectMedia presents media items in fzf and returns the selected item

func SelectMediaType

func SelectMediaType(fzfPath string) (string, error)

SelectMediaType asks user to select Movies or TV Shows

func SelectMediaTypeWithQueue added in v0.2.0

func SelectMediaTypeWithQueue(fzfPath string, queueCount int) (string, error)

SelectMediaTypeWithQueue adds "View Queue" option when queue has items

func SelectMediaWithPreview

func SelectMediaWithPreview(media []plex.MediaItem, prompt string, fzfPath string, plexURL string, plexToken string) ([]int, error)

SelectMediaWithPreview presents media in fzf with preview window showing metadata and poster

func SelectQueueItemsForRemoval added in v0.2.0

func SelectQueueItemsForRemoval(queue []*plex.MediaItem, fzfPath string) ([]int, error)

SelectQueueItemsForRemoval shows queue items for multi-select removal

func SelectWithFzf

func SelectWithFzf(items []string, prompt string, fzfPath string) (string, int, error)

SelectWithFzf presents items in fzf and returns the selected item

Types

type BrowserModel

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

Browser is a TUI browser for media items

func NewBrowser

func NewBrowser(media []plex.MediaItem, plexURL, plexToken string) *BrowserModel

NewBrowser creates a new browser model

func (*BrowserModel) GetSelected

func (m *BrowserModel) GetSelected() *plex.MediaItem

GetSelected returns the selected media item (if any)

func (*BrowserModel) Init

func (m *BrowserModel) Init() tea.Cmd

func (*BrowserModel) Update

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

func (*BrowserModel) View

func (m *BrowserModel) View() string

Jump to

Keyboard shortcuts

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