Merge pull request #27 from aditya-K2/iss26

workaround for #26
This commit is contained in:
Aditya Kurdunkar 2022-08-29 10:28:48 +05:30 committed by GitHub
commit dc88d56d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
main.go
View File

@ -42,17 +42,6 @@ func main() {
// Connecting the Renderer to the Main UI
ui.ConnectRenderer(Renderer)
if c, err := CONN.CurrentSong(); err != nil {
utils.Print("RED", "Could Not Retrieve the Current Song\n")
panic(err)
} else {
if len(c) != 0 {
Renderer.Start(c["file"])
} else {
Renderer.Start("stop")
}
}
UI := ui.NewApplication()
// Connecting the Notification Server to the Main UI
@ -97,6 +86,17 @@ func main() {
Notify := notify.NewNotificationServer()
Notify.Start()
if c, err := CONN.CurrentSong(); err != nil {
utils.Print("RED", "Could Not Retrieve the Current Song\n")
panic(err)
} else {
if len(c) != 0 {
Renderer.Start(c["file"])
} else {
Renderer.Start("stop")
}
}
// Connecting Notification Server to Client and Rendering Module so that they can send Notifications
client.SetNotificationServer(Notify)
render.SetNotificationServer(Notify)