Documentation
¶
Index ¶
- func ResetCache()
- func SetCacheCursorPath(path string, cursorPos int)
- func SetLibraryCacheItems(path string, items []list.Item)
- func SortItemsByLastModified(items []list.Item, asc bool) []list.Item
- type ByLastModified
- type CachedPath
- type Command
- type Mode
- type Model
- func (m Model) Append(i list.Item)
- func (m *Model) AppendToMarkedPlaylist(i list.Item) error
- func (m *Model) GetLibraryPathFromCache(path string) CachedPath
- func (m Model) GetViews() []*list.Model
- func (m *Model) HandleCommandInput(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandleConfirm(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandleGenericListKeys(msg tea.KeyMsg, list *list.Model) tea.Cmd
- func (m *Model) HandleGlobalKeys(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandleLibraryKeys(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandlePlaylistKeys(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandlePlaylistsKeys(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandleQueueKeys(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandleResultsKeys(msg tea.KeyMsg) tea.Cmd
- func (m *Model) HandleSearchInput(msg tea.KeyMsg) tea.Cmd
- func (m Model) Init() tea.Cmd
- func (m *Model) PlayNext(item list.Item)
- func (m *Model) PushConfirmMessage(msg string, yesOptions []string, afterConfirmFunc func(m *Model))
- func (m *Model) ReloadQueue()
- func (m *Model) ResetAfterConfirm()
- func (m *Model) ResetTextInput()
- func (m *Model) RunCommand() tea.Cmd
- func (m *Model) SetCommandMode()
- func (m *Model) SetConfirmMode()
- func (m *Model) SetRightView(view *list.Model)
- func (m *Model) SetSearchMode()
- func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) UpdateOpenPlaylist()
- func (m Model) View() string
- type QuitCommand
- type SaveCommand
- type SearchCommand
- type SortCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetCache ¶ added in v0.0.9
func ResetCache()
func SetCacheCursorPath ¶ added in v0.0.9
store where the cursor is in which part of the library tree, so we return to the same place when going up a folder
func SetLibraryCacheItems ¶ added in v0.0.9
Types ¶
type ByLastModified ¶ added in v0.0.9
func (ByLastModified) Len ¶ added in v0.0.9
func (a ByLastModified) Len() int
func (ByLastModified) Less ¶ added in v0.0.9
func (a ByLastModified) Less(i, j int) bool
func (ByLastModified) Swap ¶ added in v0.0.9
func (a ByLastModified) Swap(i, j int)
type CachedPath ¶ added in v0.0.9
type Model ¶ added in v0.0.9
type Model struct {
Library *list.Model
Queue *list.Model
Playlist *list.Model
Playlists *list.Model
Results *list.Model
// dirty hack: on list update event, all items will be recreated
// so the "marked" playlist isnt the same object anymore.
// we store the playlist path, to update marked playlist on reload.
MarkedPlaylistPath string
MarkedPlaylist list.Item
// one of the open views that has the cursor
ActiveView *list.Model
Statusbar statusbar.Model
TextInput textinput.Model
MpdClient *mpdclient.MpdClient
Keys config.Keys
QuitMessage string
QuitErrorMessage string
// contains filtered or unexported fields
}
func InitialModel ¶
func InitialModel(c config.Configuration) Model
func (*Model) AppendToMarkedPlaylist ¶ added in v0.0.9
func (*Model) GetLibraryPathFromCache ¶ added in v0.0.9
func (m *Model) GetLibraryPathFromCache(path string) CachedPath
return cursorpos and itemlist from cache
func (*Model) HandleCommandInput ¶ added in v0.0.9
func (*Model) HandleConfirm ¶ added in v0.0.9
* handles key presses after SetConfirmMode
func (*Model) HandleGenericListKeys ¶ added in v0.0.9
func (*Model) HandleGlobalKeys ¶ added in v0.0.9
func (*Model) HandleLibraryKeys ¶ added in v0.0.9
func (*Model) HandlePlaylistKeys ¶ added in v0.0.9
func (*Model) HandlePlaylistsKeys ¶ added in v0.0.9
func (*Model) HandleQueueKeys ¶ added in v0.0.9
func (*Model) HandleResultsKeys ¶ added in v0.0.9
func (*Model) HandleSearchInput ¶ added in v0.0.9
* set searchterm in all lists * "/" search, not :search
func (*Model) PushConfirmMessage ¶ added in v0.0.9
func (*Model) ReloadQueue ¶ added in v0.0.9
func (m *Model) ReloadQueue()
(re-)initialize the queue and the current playing song
func (*Model) ResetAfterConfirm ¶ added in v0.0.9
func (m *Model) ResetAfterConfirm()
func (*Model) ResetTextInput ¶ added in v0.0.9
func (m *Model) ResetTextInput()
func (*Model) RunCommand ¶ added in v0.0.9
func (*Model) SetCommandMode ¶ added in v0.0.9
func (m *Model) SetCommandMode()
func (*Model) SetConfirmMode ¶ added in v0.0.9
func (m *Model) SetConfirmMode()
func (*Model) SetRightView ¶ added in v0.0.9
func (*Model) SetSearchMode ¶ added in v0.0.9
func (m *Model) SetSearchMode()
func (*Model) UpdateOpenPlaylist ¶ added in v0.0.9
func (m *Model) UpdateOpenPlaylist()
type QuitCommand ¶ added in v0.0.9
type QuitCommand struct{}
func (QuitCommand) CompleteCandidates ¶ added in v0.0.9
func (s QuitCommand) CompleteCandidates(m *Model, input string) []string
type SaveCommand ¶ added in v0.0.9
type SaveCommand struct{}
func (SaveCommand) CompleteCandidates ¶ added in v0.0.9
func (s SaveCommand) CompleteCandidates(m *Model, input string) []string
type SearchCommand ¶ added in v0.0.9
type SearchCommand struct{}
func (SearchCommand) CompleteCandidates ¶ added in v0.0.9
func (s SearchCommand) CompleteCandidates(m *Model, input string) []string
type SortCommand ¶ added in v0.0.9
type SortCommand struct{}
func (SortCommand) CompleteCandidates ¶ added in v0.0.9
func (s SortCommand) CompleteCandidates(m *Model, input string) []string
Source Files
¶
- commands.go
- commands_quit.go
- commands_save.go
- commands_search.go
- commands_sort.go
- keys.go
- keys_library.go
- keys_playlist.go
- keys_playlists.go
- keys_queue.go
- keys_results.go
- library.go
- library_cache.go
- model.go
- model_handle_command_input.go
- model_handle_confirm.go
- model_handle_search.go
- playlist.go
- queue.go
- update.go
- view.go
Click to show internal directories.
Click to hide internal directories.