common

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackMsg

type BackMsg struct{}

BackMsg is a generic message to go back to the previous view.

type BatchDownloadMsg

type BatchDownloadMsg struct {
	Episodes []EpisodeInfo
}

BatchDownloadMsg is a message when batch download is requested for multiple episodes/chapters.

type BatchMangaDownloadMsg

type BatchMangaDownloadMsg struct {
	MediaID    string
	MediaTitle string
	Chapters   []MangaChapterInfo
	Provider   string
}

BatchMangaDownloadMsg is a message when batch manga download is requested.

type ChapterCompletedMsg

type ChapterCompletedMsg struct {
	MediaID string
	Chapter int
}

ChapterCompletedMsg is a message when a manga chapter is completed

type Component

type Component interface {
	Update(tea.Msg) (tea.Model, tea.Cmd)
}

Component is an interface for a generic Bubble Tea component.

type DebugSource

type DebugSource struct {
	Quality string
	URL     string
	Type    string
	Referer string
}

DebugSource holds info for a single source

type DebugSourcesInfo

type DebugSourcesInfo struct {
	EpisodeTitle  string
	EpisodeNumber int
	Sources       []DebugSource
	Subtitles     []DebugSubtitle
	ProviderName  string
	SelectedIndex int
}

DebugSourcesInfo holds all sources for an episode

type DebugSourcesLoadedMsg

type DebugSourcesLoadedMsg struct {
	Info  *DebugSourcesInfo
	Error error
}

DebugSourcesLoadedMsg is a message when debug sources are loaded

type DebugSubtitle

type DebugSubtitle struct {
	Language string
	URL      string
}

DebugSubtitle holds info for a single subtitle

type DetailsLoadedMsg

type DetailsLoadedMsg struct {
	Media providers.Media
	Index int
	Err   error
}

DetailsLoadedMsg is a message when details for a media item are loaded

type DownloadAddedMsg

type DownloadAddedMsg struct {
	Title    string
	Episode  int
	Quality  string
	Location string // Output file path
}

DownloadAddedMsg is a message when a download is added to queue

type DownloadCompleteMsg

type DownloadCompleteMsg struct {
	TaskID   string
	FilePath string
}

DownloadCompleteMsg is a message when a download completes

type DownloadErrorMsg

type DownloadErrorMsg struct {
	TaskID string
	Error  error
}

DownloadErrorMsg is a message when a download fails

type DownloadProgressUpdateMsg

type DownloadProgressUpdateMsg struct {
	TaskID   string
	Progress float64
	Speed    int64
	ETA      string
	Status   string
}

DownloadProgressUpdateMsg is a message containing download progress update

type DownloadRequestMsg

type DownloadRequestMsg struct {
	MediaID       string
	MediaTitle    string
	MediaType     string
	EpisodeID     string
	EpisodeNumber int
	EpisodeTitle  string
	Season        int
	Quality       string
	Provider      string
	StreamURL     string
}

DownloadRequestMsg is a message to request downloading an episode

type DownloadsTickMsg

type DownloadsTickMsg struct{}

DownloadsTickMsg is sent periodically to trigger auto-refresh in downloads view

type EpisodeDownloadMsg

type EpisodeDownloadMsg struct {
	EpisodeID string `json:"episode_id"`
	Number    int    `json:"number"`
	Title     string `json:"title"`
}

EpisodeDownloadMsg is a message when a download is requested for an episode.

type EpisodeInfo

type EpisodeInfo struct {
	EpisodeID string
	Number    int
	Title     string
}

EpisodeInfo holds basic episode information for messaging

type EpisodeSelectedMsg

type EpisodeSelectedMsg struct {
	EpisodeID string `json:"episode_id"`
	Number    int    `json:"number"`
	Title     string `json:"title"`
}

EpisodeSelectedMsg is a message when an episode is selected.

type EpisodesLoadedMsg

type EpisodesLoadedMsg struct {
	Episodes []EpisodeInfo
	Error    error
}

EpisodesLoadedMsg is a message when episodes are loaded successfully.

type ErrMsg

type ErrMsg struct{ Err error }

ErrMsg is a message that contains an error.

func (ErrMsg) Error

func (e ErrMsg) Error() string

Error satisfies the error interface.

type FuzzySearch

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

FuzzySearch provides fuzzy search functionality for list views

func NewFuzzySearch

func NewFuzzySearch() *FuzzySearch

NewFuzzySearch creates a new fuzzy search component

func (*FuzzySearch) Activate

func (f *FuzzySearch) Activate() tea.Cmd

Activate enables fuzzy search mode

func (*FuzzySearch) Deactivate

func (f *FuzzySearch) Deactivate()

Deactivate disables fuzzy search mode

func (*FuzzySearch) Filter

func (f *FuzzySearch) Filter(strings []string) []int

Filter performs fuzzy matching on a list of strings and returns matching indices The strings slice should contain the searchable text for each item

func (*FuzzySearch) IsActive

func (f *FuzzySearch) IsActive() bool

IsActive returns whether fuzzy search is currently active

func (*FuzzySearch) IsLocked

func (f *FuzzySearch) IsLocked() bool

IsLocked returns whether the filter is locked (not editable)

func (*FuzzySearch) Lock

func (f *FuzzySearch) Lock()

Lock locks the filter (stops editing, enables action keys)

func (*FuzzySearch) Query

func (f *FuzzySearch) Query() string

Query returns the current search query

func (*FuzzySearch) SetWidth

func (f *FuzzySearch) SetWidth(width int)

SetWidth sets the width of the fuzzy search input

func (*FuzzySearch) Unlock

func (f *FuzzySearch) Unlock() tea.Cmd

Unlock unlocks the filter (allows editing again)

func (*FuzzySearch) Update

func (f *FuzzySearch) Update(msg tea.Msg) tea.Cmd

Update handles input updates for fuzzy search Only processes input when active and not locked

func (*FuzzySearch) View

func (f *FuzzySearch) View() string

View renders the fuzzy search input

type GenerateDebugInfoMsg

type GenerateDebugInfoMsg struct {
	EpisodeID string
	Number    int
	Title     string
}

GenerateDebugInfoMsg is a message to request debug info (source links) for an episode

type GenerateMediaDebugInfoMsg

type GenerateMediaDebugInfoMsg struct {
	MediaID string
	Title   string
	Type    string
}

GenerateMediaDebugInfoMsg is a message to request debug info for a media item (e.g. movie)

type GenerateWatchPartyMsg

type GenerateWatchPartyMsg struct {
	EpisodeID string
	Title     string
	Number    int
}

GenerateWatchPartyMsg is sent when requesting to generate a WatchParty URL

type GoToAniListMsg

type GoToAniListMsg struct{}

GoToAniListMsg is a message to switch to AniList view

type GoToDownloadsMsg

type GoToDownloadsMsg struct{}

GoToDownloadsMsg is a message to switch to downloads view

type GoToHistoryMsg

type GoToHistoryMsg struct {
	MediaType providers.MediaType
}

GoToHistoryMsg is a message to switch to history view

type GoToHomeMsg

type GoToHomeMsg struct{}

GoToHomeMsg is a message to switch to the home view.

type GoToProviderStatusMsg

type GoToProviderStatusMsg struct{}

GoToProviderStatusMsg is a message to switch to the provider status view.

type GoToSearchMsg

type GoToSearchMsg struct{}

GoToSearchMsg is a message to switch to the search view.

type MangaChapterDownloadMsg

type MangaChapterDownloadMsg struct {
	MediaID      string
	MediaTitle   string
	ChapterID    string
	ChapterTitle string
	ChapterNum   int
	Provider     string
}

MangaChapterDownloadMsg is a message when a manga chapter download is requested.

type MangaChapterInfo

type MangaChapterInfo struct {
	ChapterID    string
	ChapterTitle string
	ChapterNum   int
}

MangaChapterInfo holds basic chapter information for batch downloads

type MangaInfoMsg

type MangaInfoMsg struct {
	AnimeTitle string
}

MangaInfoMsg is a message to trigger scraping for manga info.

type MangaInfoResultMsg

type MangaInfoResultMsg struct {
	Info string
	Err  error
}

MangaInfoResultMsg is a message that contains the result of scraping for manga info.

type MangaPagesLoadedMsg

type MangaPagesLoadedMsg struct {
	Pages []string
	Err   error
}

MangaPagesLoadedMsg is a message when manga pages are loaded successfully.

type MangaQuitMsg

type MangaQuitMsg struct{}

type MediaDownloadMsg

type MediaDownloadMsg struct {
	MediaID string
	Title   string
	Type    string
}

MediaDownloadMsg is a message when a download is requested for a media item (e.g. movie)

type MediaSelectedMsg

type MediaSelectedMsg struct {
	MediaID string `json:"media_id"`
	Title   string `json:"title"`
	Type    string `json:"type"`
}

MediaSelectedMsg is a message when a media item is selected.

type NextChapterMsg

type NextChapterMsg struct{}

NextChapterMsg is a message to request the next chapter in manga reader

type OpenWatchPartyMsg

type OpenWatchPartyMsg struct {
	URL string
	Err error
}

OpenWatchPartyMsg is sent when requesting to open a WatchParty URL in browser

type PerformSearchMsg

type PerformSearchMsg struct {
	Query string
}

PerformSearchMsg is a message that triggers a search.

type PlaybackAutoReturnMsg

type PlaybackAutoReturnMsg struct{}

PlaybackAutoReturnMsg is sent after a delay to automatically return from playback completion

type PlaybackEndedMsg

type PlaybackEndedMsg struct {
	WatchedPercentage float64
	WatchedDuration   string
	TotalDuration     string
}

PlaybackEndedMsg is a message when playback has ended

type PlaybackErrorMsg

type PlaybackErrorMsg struct {
	Error error
}

PlaybackErrorMsg is a message when playback encounters an error

type PlaybackProgressMsg

type PlaybackProgressMsg struct {
	Progress *player.PlaybackProgress
	Err      error
}

PlaybackProgressMsg carries the result of an async GetProgress call

type PlaybackStartedMsg

type PlaybackStartedMsg struct{}

PlaybackStartedMsg is a message when playback has successfully started

type PlaybackStartingMsg

type PlaybackStartingMsg struct {
	EpisodeID     string
	EpisodeNumber int
	EpisodeTitle  string
}

PlaybackStartingMsg is a message when playback is being initiated

type PlaybackTickMsg

type PlaybackTickMsg struct{}

PlaybackTickMsg is sent periodically to trigger playback status polling

type PlayerLaunchTimeoutCheckMsg

type PlayerLaunchTimeoutCheckMsg struct{}

PlayerLaunchTimeoutCheckMsg is a tick message to check player launch status

type PlayerLaunchingMsg

type PlayerLaunchingMsg struct{}

PlayerLaunchingMsg is a message when player is being launched

type ProviderStatusesMsg

type ProviderStatusesMsg []*providers.ProviderStatus

ProviderStatusesMsg is a message that contains the health statuses of providers.

type RefreshHistoryMsg

type RefreshHistoryMsg struct{}

RefreshHistoryMsg is a message to refresh recent history in home view

type RequestDetailsMsg

type RequestDetailsMsg struct {
	MediaID string
	Index   int
}

RequestDetailsMsg is a message to request details for a media item

type ResumePlaybackMsg

type ResumePlaybackMsg struct {
	MediaID         string
	MediaTitle      string
	MediaType       string // anime, movie, tv, manga
	Episode         int
	Season          int
	ProgressSeconds int
	ProviderName    string
}

ResumePlaybackMsg is a message to resume playback from a specific position

type SearchProviderMsg

type SearchProviderMsg struct {
	ProviderName string
	Query        string
	SaveMapping  bool
}

SearchProviderMsg is a message to search a specific provider

type SearchResultsMsg

type SearchResultsMsg struct {
	Results []interface{}
	Err     error
}

SearchResultsMsg is a message that contains the results of a search.

type SeasonInfo

type SeasonInfo struct {
	ID     string
	Number int
	Title  string
}

SeasonInfo holds basic season information for messaging

type SeasonSelectedMsg

type SeasonSelectedMsg struct {
	SeasonID string
}

SeasonSelectedMsg is a message when a season is selected.

type SeasonsLoadedMsg

type SeasonsLoadedMsg struct {
	Seasons []SeasonInfo
	Error   error
}

SeasonsLoadedMsg is a message when seasons are loaded successfully.

type SetWatchPartyProxyMsg

type SetWatchPartyProxyMsg struct {
	ProxyURL string
	Origin   string
}

SetWatchPartyProxyMsg is sent when updating the WatchParty proxy configuration temporarily

type ShareHistoryViaWatchPartyMsg

type ShareHistoryViaWatchPartyMsg struct {
	MediaID      string
	MediaTitle   string
	Episode      int
	Season       int
	ProviderName string
}

ShareHistoryViaWatchPartyMsg is sent when user wants to share history item via WatchParty

type ShareMediaViaWatchPartyMsg

type ShareMediaViaWatchPartyMsg struct {
	MediaID string
	Title   string
	Type    string
}

ShareMediaViaWatchPartyMsg is sent when user wants to share a media from search results via WatchParty

type ShareRecentViaWatchPartyMsg

type ShareRecentViaWatchPartyMsg struct {
	MediaID      string
	MediaTitle   string
	Episode      int
	Season       int
	ProviderName string
}

ShareRecentViaWatchPartyMsg is sent when user wants to share recent item via WatchParty

type ShareViaWatchPartyMsg

type ShareViaWatchPartyMsg struct{}

ShareViaWatchPartyMsg is sent when user wants to share current media via WatchParty

type ShowAudioSelectorMsg

type ShowAudioSelectorMsg struct {
	Tracks       []providers.AudioTrack
	Stream       *providers.StreamURL
	AniListID    int
	EpisodeID    string
	EpisodeNum   int
	EpisodeTitle string
}

ShowAudioSelectorMsg is a message to show the audio selector with given tracks

type TickMsg

type TickMsg time.Time

TickMsg is a message sent on a timer tick.

type ToggleProviderMsg

type ToggleProviderMsg struct{}

ToggleProviderMsg is a message to switch between provider types.

type WatchPartyInfo

type WatchPartyInfo struct {
	URL               string
	ProxiedURL        string
	WatchPartyURL     string
	Subtitles         []providers.Subtitle
	Referer           string
	Headers           map[string]string
	Title             string
	Type              string
	EpisodeTitle      string
	EpisodeNumber     int
	NextEpisodeID     string
	NextEpisodeTitle  string
	NextEpisodeNumber int
	ProviderName      string
}

WatchPartyInfo contains information for the WatchParty popup

type WatchPartyMsg

type WatchPartyMsg struct {
	URL            string
	Err            error
	WatchPartyInfo *WatchPartyInfo // Additional info for the popup
}

WatchPartyMsg is sent when a WatchParty URL is generated

Jump to

Keyboard shortcuts

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