-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (26 loc) · 758 Bytes
/
main.go
File metadata and controls
33 lines (26 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
tea "github.com/charmbracelet/bubbletea"
)
// TODO: cli flags OR tui main menu [queue/artists/albums]; the latter only
// makes sense once i have a good grasp of panes etc
func main() {
//
// TODO: zerolog
// https://github.com/kubefirst/kubefirst/blob/49665b715b1899887e82454a920506f493ba5448/main.go#L118
lf, _ := tea.LogToFile("/tmp/tea.log", "plaque")
defer func() { _ = lf.Close() }()
// browseArtists(discogsSearchArtist("rira")).rate()
// return
var p tea.Model
switch mpvRunning() {
case true:
p = artistBrowser()
case false:
p = queueBrowser()
}
// WithAltScreen should always be used, to avoid janky rendering
if _, err := tea.NewProgram(p, tea.WithAltScreen()).Run(); err != nil {
panic(err)
}
}