Documentation ¶
Index ¶
- func CloseView()
- func SetView(viewIface View, noappend ...struct{})
- type BannerView
- func (b *BannerView) Exit() bool
- func (b *BannerView) Init() bool
- func (b *BannerView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (b *BannerView) Name() string
- func (b *BannerView) Primitive() tview.Primitive
- func (b *BannerView) Tabs() app.Tab
- func (d *BannerView) ThemeProperty() theme.ThemeProperty
- type ChannelContinuation
- type ChannelTable
- type ChannelView
- func (c *ChannelView) EventHandler(pageType string, justView bool)
- func (c *ChannelView) Exit() bool
- func (c *ChannelView) Init() bool
- func (c *ChannelView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (c *ChannelView) Load(pageType string, loadMore ...struct{})
- func (c *ChannelView) Name() string
- func (c *ChannelView) Playlists(id string, loadMore ...struct{}) (string, string, error)
- func (c *ChannelView) Primitive() tview.Primitive
- func (c *ChannelView) Query()
- func (c *ChannelView) Releases(id string, loadMore ...struct{}) (string, string, error)
- func (c *ChannelView) Search(text string)
- func (c *ChannelView) Tabs() app.Tab
- func (c *ChannelView) ThemeProperty() theme.ThemeProperty
- func (c *ChannelView) Videos(id string, loadMore ...struct{}) (string, string, error)
- func (c *ChannelView) View(pageType string)
- type CommentsView
- func (c *CommentsView) Close()
- func (c *CommentsView) Init()
- func (c *CommentsView) IsOpen() bool
- func (c *CommentsView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (c *CommentsView) Load(id, title string)
- func (c *CommentsView) Show()
- func (c *CommentsView) Subcomments(selected, removed *tview.TreeNode, continuation string)
- type DashboardTable
- type DashboardView
- func (d *DashboardView) AuthPage()
- func (d *DashboardView) CurrentPage(page ...string) string
- func (d *DashboardView) EventHandler()
- func (d *DashboardView) Exit() bool
- func (d *DashboardView) Init() bool
- func (d *DashboardView) IsFocused() bool
- func (d *DashboardView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (d *DashboardView) Load(pageType string, reload ...struct{})
- func (d *DashboardView) ModifyHandler(add bool)
- func (d *DashboardView) Name() string
- func (d *DashboardView) PlaylistForm(edit bool)
- func (d *DashboardView) Primitive() tview.Primitive
- func (d *DashboardView) Tabs() app.Tab
- func (d *DashboardView) ThemeProperty() theme.ThemeProperty
- func (d *DashboardView) View(auth ...struct{})
- type DownloadData
- type DownloadItem
- type DownloadProgress
- type DownloadsView
- func (d *DownloadsView) Exit() bool
- func (d *DownloadsView) Init() bool
- func (d *DownloadsView) IsInitialized() bool
- func (d *DownloadsView) IsPageOpen() bool
- func (d *DownloadsView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (d *DownloadsView) LoadOptions(id, title string)
- func (d *DownloadsView) Name() string
- func (d *DownloadsView) OptionKeybindings(event *tcell.EventKey) *tcell.EventKey
- func (d *DownloadsView) Primitive() tview.Primitive
- func (d *DownloadsView) SetDir(info ...inv.SearchData)
- func (d *DownloadsView) ShowOptions(data ...inv.SearchData)
- func (d *DownloadsView) Tabs() app.Tab
- func (d *DownloadsView) ThemeProperty() theme.ThemeProperty
- func (d *DownloadsView) TransferPlaylist(id, file string, flags int, auth, appendToFile bool) (string, int, error)
- func (d *DownloadsView) TransferVideo(id, itag, filename string)
- func (d *DownloadsView) View()
- type InfoView
- type PlaylistView
- func (p *PlaylistView) EventHandler(justView, auth bool, loadMore ...struct{})
- func (p *PlaylistView) Exit() bool
- func (p *PlaylistView) Init() bool
- func (p *PlaylistView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (p *PlaylistView) Load(id string, loadMore ...struct{})
- func (p *PlaylistView) Name() string
- func (p *PlaylistView) Primitive() tview.Primitive
- func (p *PlaylistView) Save(id string, auth bool)
- func (p *PlaylistView) Tabs() app.Tab
- func (p *PlaylistView) ThemeProperty() theme.ThemeProperty
- func (p *PlaylistView) View()
- type SearchView
- func (s *SearchView) Exit() bool
- func (s *SearchView) Init() bool
- func (s *SearchView) Keybindings(event *tcell.EventKey) *tcell.EventKey
- func (s *SearchView) Name() string
- func (s *SearchView) Parameters()
- func (s *SearchView) ParseQuery()
- func (s *SearchView) Primitive() tview.Primitive
- func (s *SearchView) Query(switchMode ...struct{})
- func (s *SearchView) Start(text string)
- func (s *SearchView) Suggestions(text string)
- func (s *SearchView) Tabs() app.Tab
- func (d *SearchView) ThemeProperty() theme.ThemeProperty
- type View
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BannerView ¶
type BannerView struct {
// contains filtered or unexported fields
}
BannerView describes the layout of a banner view.
var Banner BannerView
Banner stores the banner view properties.
func (*BannerView) Keybindings ¶
func (b *BannerView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings describes the banner view's keybindings.
func (*BannerView) Name ¶
func (b *BannerView) Name() string
Name returns the name of the banner view.
func (*BannerView) Primitive ¶
func (b *BannerView) Primitive() tview.Primitive
Primitive returns the primitive for the banner view.
func (*BannerView) Tabs ¶
func (b *BannerView) Tabs() app.Tab
Tabs describes the tab layout for the banner view.
func (*BannerView) ThemeProperty ¶ added in v0.3.8
func (d *BannerView) ThemeProperty() theme.ThemeProperty
ThemeProperty returns the banner view's theme property.
type ChannelContinuation ¶
type ChannelContinuation struct {
// contains filtered or unexported fields
}
ChannelContinuation describes the page/continuation data for the channel table.
type ChannelTable ¶
type ChannelTable struct {
// contains filtered or unexported fields
}
ChannelTable describes the properties of a channel table.
type ChannelView ¶
type ChannelView struct {
// contains filtered or unexported fields
}
ChannelView describes the layout of a channel view.
var Channel ChannelView
Channel stores the channel view properties.
func (*ChannelView) EventHandler ¶
func (c *ChannelView) EventHandler(pageType string, justView bool)
EventHandler shows the channel view according to the provided page type.
func (*ChannelView) Keybindings ¶
func (c *ChannelView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings describes the keybindings for the channel view.
func (*ChannelView) Load ¶
func (c *ChannelView) Load(pageType string, loadMore ...struct{})
Load loads the channel view according to the page type.
func (*ChannelView) Name ¶
func (c *ChannelView) Name() string
Name returns the name of the channel view.
func (*ChannelView) Playlists ¶
func (c *ChannelView) Playlists(id string, loadMore ...struct{}) (string, string, error)
Playlists loads the channel playlists.
func (*ChannelView) Primitive ¶
func (c *ChannelView) Primitive() tview.Primitive
Primitive returns the primitive for the channel view.
func (*ChannelView) Query ¶
func (c *ChannelView) Query()
Query prompts for a query and searches the channel.
func (*ChannelView) Releases ¶ added in v0.3.8
func (c *ChannelView) Releases(id string, loadMore ...struct{}) (string, string, error)
Releases loads the channel releases.
func (*ChannelView) Search ¶
func (c *ChannelView) Search(text string)
Search searches for the provided query within the channel.
func (*ChannelView) Tabs ¶
func (c *ChannelView) Tabs() app.Tab
Tabs describes the tab layout for the channel view.
func (*ChannelView) ThemeProperty ¶ added in v0.3.8
func (c *ChannelView) ThemeProperty() theme.ThemeProperty
ThemeProperty returns the channel view's theme property.
type CommentsView ¶
type CommentsView struct {
// contains filtered or unexported fields
}
CommentsView describes the layout for a comments view.
var Comments CommentsView
Comments stores the properties of the comments view.
func (*CommentsView) IsOpen ¶ added in v0.4.3
func (c *CommentsView) IsOpen() bool
IsOpen returns if the comments view is open.
func (*CommentsView) Keybindings ¶
func (c *CommentsView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings describes the keybindings for the comments view.
func (*CommentsView) Load ¶
func (c *CommentsView) Load(id, title string)
Load loads the comments from the given video.
func (*CommentsView) Subcomments ¶
func (c *CommentsView) Subcomments(selected, removed *tview.TreeNode, continuation string)
Subcomments loads the subcomments for the currently selected comment.
type DashboardTable ¶
type DashboardTable struct {
// contains filtered or unexported fields
}
DashboardTable describes the properties of a dashboard table.
type DashboardView ¶
type DashboardView struct {
// contains filtered or unexported fields
}
DashboardView describes the layout for a dashboard view.
var Dashboard DashboardView
Dashboard stores the dashboard view properties.
func (*DashboardView) AuthPage ¶
func (d *DashboardView) AuthPage()
AuthPage shows the authentication page.
func (*DashboardView) CurrentPage ¶
func (d *DashboardView) CurrentPage(page ...string) string
CurrentPage returns the dashboard's current page.
func (*DashboardView) EventHandler ¶
func (d *DashboardView) EventHandler()
EventHandler checks whether authentication is needed before showing the dashboard view.
func (*DashboardView) Init ¶
func (d *DashboardView) Init() bool
Init initializes the dashboard view.
func (*DashboardView) IsFocused ¶
func (d *DashboardView) IsFocused() bool
IsFocused returns if the dashboard view is focused or not.
func (*DashboardView) Keybindings ¶
func (d *DashboardView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings defines the keybindings for the dashboard view.
func (*DashboardView) Load ¶
func (d *DashboardView) Load(pageType string, reload ...struct{})
Load loads the dashboard view according to the provided page type.
func (*DashboardView) ModifyHandler ¶
func (d *DashboardView) ModifyHandler(add bool)
ModifyHandler handles the following activities: - Adding/removing videos to/from a user playlist - Deleting user playlists - Subscribing/unsubscribing to/from channels
func (*DashboardView) Name ¶
func (d *DashboardView) Name() string
Name returns the name of the dashboard view.
func (*DashboardView) PlaylistForm ¶
func (d *DashboardView) PlaylistForm(edit bool)
PlaylistForm displays a form to create/edit a user playlist.
func (*DashboardView) Primitive ¶
func (d *DashboardView) Primitive() tview.Primitive
Primitive returns the primitive for the dashboard view.
func (*DashboardView) Tabs ¶
func (d *DashboardView) Tabs() app.Tab
Tabs describes the tab layout for the dashboard view.
func (*DashboardView) ThemeProperty ¶ added in v0.3.8
func (d *DashboardView) ThemeProperty() theme.ThemeProperty
ThemeProperty returns the dashboard view's theme property.
func (*DashboardView) View ¶
func (d *DashboardView) View(auth ...struct{})
View shows the dashboard view.
type DownloadData ¶
type DownloadData struct {
// contains filtered or unexported fields
}
DownloadData describes the information for the downloading item.
type DownloadItem ¶ added in v0.3.8
type DownloadItem struct {
// contains filtered or unexported fields
}
type DownloadProgress ¶
type DownloadProgress struct {
// contains filtered or unexported fields
}
DownloadProgress describes the layout of a progress indicator.
type DownloadsView ¶
type DownloadsView struct {
// contains filtered or unexported fields
}
DownloadsView describes the layout of a downloads view.
var Downloads DownloadsView
Downloads stores the downloads view properties.
func (*DownloadsView) Init ¶
func (d *DownloadsView) Init() bool
Init initializes the downloads view.
func (*DownloadsView) IsInitialized ¶ added in v0.3.8
func (d *DownloadsView) IsInitialized() bool
IsInitialized returns whether the downloads view is initialized.
func (*DownloadsView) IsPageOpen ¶ added in v0.4.3
func (d *DownloadsView) IsPageOpen() bool
func (*DownloadsView) Keybindings ¶
func (d *DownloadsView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings describes the keybindings for the downloads view.
func (*DownloadsView) LoadOptions ¶
func (d *DownloadsView) LoadOptions(id, title string)
LoadOptions loads the download options for the selected video.
func (*DownloadsView) Name ¶
func (d *DownloadsView) Name() string
Name returns the name of the downloads view.
func (*DownloadsView) OptionKeybindings ¶
func (d *DownloadsView) OptionKeybindings(event *tcell.EventKey) *tcell.EventKey
OptionKeybindings describes the keybindings for the download options popup.
func (*DownloadsView) Primitive ¶
func (d *DownloadsView) Primitive() tview.Primitive
Primitive returns the primitive for the downloads view.
func (*DownloadsView) SetDir ¶ added in v0.3.3
func (d *DownloadsView) SetDir(info ...inv.SearchData)
SetDir sets the download directory.
func (*DownloadsView) ShowOptions ¶
func (d *DownloadsView) ShowOptions(data ...inv.SearchData)
ShowOptions shows a list of download options for the selected video.
func (*DownloadsView) Tabs ¶
func (d *DownloadsView) Tabs() app.Tab
Tabs describes the tab layout for the downloads view.
func (*DownloadsView) ThemeProperty ¶ added in v0.3.8
func (d *DownloadsView) ThemeProperty() theme.ThemeProperty
ThemeProperty returns the download view's theme property.
func (*DownloadsView) TransferPlaylist ¶ added in v0.3.6
func (d *DownloadsView) TransferPlaylist(id, file string, flags int, auth, appendToFile bool) (string, int, error)
TransferPlaylist starts the download for the selected playlist.
func (*DownloadsView) TransferVideo ¶ added in v0.3.6
func (d *DownloadsView) TransferVideo(id, itag, filename string)
TransferVideo starts the download for the selected video.
type InfoView ¶
type InfoView struct {
// contains filtered or unexported fields
}
InfoView describes the layout for a playlist/channel page. It displays a title, description and the entries.
type PlaylistView ¶
type PlaylistView struct { ID string // contains filtered or unexported fields }
PlaylistView describes the layout of a playlist view.
var Playlist PlaylistView
Playlist stores the playlist view properties.
func (*PlaylistView) EventHandler ¶
func (p *PlaylistView) EventHandler(justView, auth bool, loadMore ...struct{})
EventHandler shows the playlist view for the currently selected playlist.
func (*PlaylistView) Keybindings ¶
func (p *PlaylistView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings describes the keybindings for the playlist view.
func (*PlaylistView) Load ¶
func (p *PlaylistView) Load(id string, loadMore ...struct{})
Load loads the playlist.
func (*PlaylistView) Name ¶
func (p *PlaylistView) Name() string
Name returns the name of the playlist view.
func (*PlaylistView) Primitive ¶
func (p *PlaylistView) Primitive() tview.Primitive
Primitive returns the primitive for the playlist view.
func (*PlaylistView) Save ¶ added in v0.3.6
func (p *PlaylistView) Save(id string, auth bool)
Save downloads and saves the playlist to a file.
func (*PlaylistView) Tabs ¶
func (p *PlaylistView) Tabs() app.Tab
Tabs returns the tab layout for the playlist view.
func (*PlaylistView) ThemeProperty ¶ added in v0.3.8
func (p *PlaylistView) ThemeProperty() theme.ThemeProperty
ThemeProperty returns the playlist view's theme property.
type SearchView ¶
type SearchView struct {
// contains filtered or unexported fields
}
SearchView describes the layout for a search view.
var ( // Search stores the search view properties Search SearchView )
func (*SearchView) Keybindings ¶
func (s *SearchView) Keybindings(event *tcell.EventKey) *tcell.EventKey
Keybindings describes the keybindings for the search view.
func (*SearchView) Name ¶
func (s *SearchView) Name() string
Name returns the name of the search view.
func (*SearchView) Parameters ¶
func (s *SearchView) Parameters()
Parameters displays a popup to modify the search parameters.
func (*SearchView) ParseQuery ¶
func (s *SearchView) ParseQuery()
ParseQuery parses the 'search-video', 'search-playlist' and 'search-channel' command-line parameters.
func (*SearchView) Primitive ¶
func (s *SearchView) Primitive() tview.Primitive
Primitive returns the primitive for the search view.
func (*SearchView) Query ¶
func (s *SearchView) Query(switchMode ...struct{})
Query displays a prompt and search for the provided query.
func (*SearchView) Start ¶
func (s *SearchView) Start(text string)
Start shows the search view and fetches results for the search query.
func (*SearchView) Suggestions ¶
func (s *SearchView) Suggestions(text string)
Suggestions shows search suggestions.
func (*SearchView) Tabs ¶
func (s *SearchView) Tabs() app.Tab
Tabs returns the tab layout for the search view.
func (*SearchView) ThemeProperty ¶ added in v0.3.8
func (d *SearchView) ThemeProperty() theme.ThemeProperty
ThemeProperty returns the search view's theme property.
type View ¶
type View interface { Name() string Tabs() app.Tab Init() bool Exit() bool Keybindings(event *tcell.EventKey) *tcell.EventKey Primitive() tview.Primitive ThemeProperty() theme.ThemeProperty }
View describes a view.
func PreviousView ¶
func PreviousView() View
PreviousView returns the view before the one currently displayed.