ui

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Screen tcell.Screen
	Width  int
	Height int

	GMusic *gmusic.GMusic
	LastFM *lastfm.Client

	// Better:
	// Database *Database
	DB         *bolt.DB
	ArtistsMap map[string]bool
	Artists    sort.StringSlice
	Songs      map[string][]string
	Albums     map[string][]string

	LastAlbum string
	Status    *Status
}

App define the UI application

func New

func New(gmusic *gmusic.GMusic, lmclient *lastfm.Client, lastfm string, db *bolt.DB) (*App, error)

New creates a new UI

func (*App) Run

func (app *App) Run()

type Status

type Status struct {
	ScrOffset map[bool]int
	Offset    int
	CurPos    map[bool]int
	NumAlbum  map[bool]int
	InTracks  bool
	InSearch  bool
	LastFM    bool
	NumTrack  int
	Queue     [][]*music.BTrack // playlist, updated on each movement of cursor in artists view
	Query     []rune            // search query

	State chan int // player's state: play, pause, stop, etc

}

Jump to

Keyboard shortcuts

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