From 73982220a6041d79ff44d35e15e57ff0ab33a370 Mon Sep 17 00:00:00 2001 From: aditya-K2 Date: Thu, 4 Aug 2022 03:32:58 +0530 Subject: [PATCH] workaround for #26 --- main.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/main.go b/main.go index dec4cea..14b99fa 100644 --- a/main.go +++ b/main.go @@ -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)