Image Previews Implementation

This commit is contained in:
aditya-K2
2021-10-24 13:26:10 +05:30
parent 9b1e8fd4f7
commit 3ad3e58019
3 changed files with 43 additions and 10 deletions

15
main.go
View File

@@ -24,7 +24,15 @@ func main() {
}
defer conn.Close()
UI := newApplication(*conn)
r := newRenderer()
c, _ := conn.CurrentSong()
if len(c) != 0 {
r.Start(DBDIR + c["file"])
} else {
r.Start("stop")
}
UI := newApplication(*conn, r)
fileMap, err := conn.GetFiles()
dirTree := generateDirectoryTree(fileMap)
@@ -165,6 +173,11 @@ func main() {
UI.App.Stop()
return nil
}
case 115:
{
conn.Stop()
return nil
}
default:
{
return e