client

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conn               *mpd.Client
	WHITE_AND_BOLD     string = "[white::b]"
	DirTree            *FileNode
	Matches            fuzzy.Matches
	SearchContentSlice []interface{}
	EmptySearchErr     = errors.New("empty Search String Provided")
	AllContent         []string
)

Functions

func AddAlbum

func AddAlbum(album string) error

func AddArtist

func AddArtist(artist string) error

func AddTitle

func AddTitle(title string, play bool) error

func GenerateContentSlice

func GenerateContentSlice(selectedSuggestion string) ([]interface{}, error)

The GenerateContentSlice returns a slice of the content to be displayed on the Search View.

func GetContent

func GetContent()

func TogglePlayBack

func TogglePlayBack() error

Types

type FileNode

type FileNode struct {
	Children     []FileNode
	Path         string
	Parent       *FileNode
	AbsolutePath string
	Title        string
	Artist       string
	Album        string
}

func GenerateDirectoryTree

func GenerateDirectoryTree(path []mpd.Attrs) *FileNode

func (*FileNode) AddChildNode

func (f *FileNode) AddChildNode(m FileNode)

func (*FileNode) AddChildren

func (f *FileNode) AddChildren(
	path string, title string, artist string, album string)

func (FileNode) Print

func (f FileNode) Print(count int)

type FileNodes

type FileNodes []FileNode

Source Interface For Fuzzy Searching.

func (FileNodes) Len

func (f FileNodes) Len() int

func (FileNodes) String

func (f FileNodes) String(i int) string

Jump to

Keyboard shortcuts

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