minor changes in formatting
This commit is contained in:
parent
0d9227e019
commit
6b7fff82b7
46
main.go
46
main.go
@ -19,14 +19,14 @@ import (
|
|||||||
var (
|
var (
|
||||||
CONN *mpd.Client
|
CONN *mpd.Client
|
||||||
UI *ui.Application
|
UI *ui.Application
|
||||||
NOTIFICATION_SERVER *NotificationServer
|
Notify *NotificationServer
|
||||||
RENDERER *Renderer
|
RENDERER *Renderer
|
||||||
Volume int64
|
Volume int64
|
||||||
Random bool
|
Random bool
|
||||||
Repeat bool
|
Repeat bool
|
||||||
InsidePlaylist bool = true
|
InsidePlaylist = true
|
||||||
InsideSearchView bool = false
|
InsideSearchView = false
|
||||||
ARTIST_TREE map[string]map[string]map[string]string
|
ArtistTree map[string]map[string]map[string]string
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -62,26 +62,26 @@ func main() {
|
|||||||
Random, _ = strconv.ParseBool(_v["random"])
|
Random, _ = strconv.ParseBool(_v["random"])
|
||||||
Repeat, _ = strconv.ParseBool(_v["repeat"])
|
Repeat, _ = strconv.ParseBool(_v["repeat"])
|
||||||
|
|
||||||
ARTIST_TREE, err = client.GenerateArtistTree()
|
ArtistTree, err = client.GenerateArtistTree()
|
||||||
ARTIST_TREE_CONTENT := utils.ConvertToArray(ARTIST_TREE)
|
ArtistTreeContent := utils.ConvertToArray(ArtistTree)
|
||||||
NOTIFICATION_SERVER = NewNotificationServer()
|
Notify = NewNotificationServer()
|
||||||
NOTIFICATION_SERVER.Start()
|
Notify.Start()
|
||||||
client.SetNotificationServer(NOTIFICATION_SERVER)
|
client.SetNotificationServer(Notify)
|
||||||
|
|
||||||
var SEARCH_CONTENT_SLICE []interface{}
|
var SearchContentSlice []interface{}
|
||||||
|
|
||||||
UI.ExpandedView.SetDrawFunc(func(s tcell.Screen, x, y, width, height int) (int, int, int, int) {
|
UI.ExpandedView.SetDrawFunc(func(s tcell.Screen, x, y, width, height int) (int, int, int, int) {
|
||||||
if InsidePlaylist {
|
if InsidePlaylist {
|
||||||
client.UpdatePlaylist(UI.ExpandedView)
|
client.UpdatePlaylist(UI.ExpandedView)
|
||||||
} else if InsideSearchView {
|
} else if InsideSearchView {
|
||||||
client.UpdateSearchView(UI.ExpandedView, SEARCH_CONTENT_SLICE)
|
client.UpdateSearchView(UI.ExpandedView, SearchContentSlice)
|
||||||
} else {
|
} else {
|
||||||
client.Update(dirTree.Children, UI.ExpandedView)
|
client.Update(dirTree.Children, UI.ExpandedView)
|
||||||
}
|
}
|
||||||
return UI.ExpandedView.GetInnerRect()
|
return UI.ExpandedView.GetInnerRect()
|
||||||
})
|
})
|
||||||
|
|
||||||
var FUNC_MAP = map[string]func(){
|
var FuncMap = map[string]func(){
|
||||||
"showChildrenContent": func() {
|
"showChildrenContent": func() {
|
||||||
r, _ := UI.ExpandedView.GetSelection()
|
r, _ := UI.ExpandedView.GetSelection()
|
||||||
if !InsidePlaylist && !InsideSearchView {
|
if !InsidePlaylist && !InsideSearchView {
|
||||||