Fixing Slow down of Playlists mentioned @ #20
As mentioned at https://github.com/aditya-K2/gomp/issues/20#issuecomment-1142443829 The Slow Down was caused due to constant calls to the MPD Server for playlist info. Using Watcher to handle playlist event changes. Also when In SearchView upon adding Artist/Album due to constant change in playlists there was a slow down. Hence using CommandList for that.
This commit is contained in:
4
main.go
4
main.go
@@ -60,9 +60,6 @@ func main() {
|
||||
// Generating the Directory Tree for File Navigation.
|
||||
client.DirTree = client.GenerateDirectoryTree(fileMap)
|
||||
|
||||
// Default View upon Opening is of Playlist.
|
||||
views.PView.Update(ui.Ui.ExpandedView)
|
||||
|
||||
var Volume int64
|
||||
var Random, Repeat bool
|
||||
var SeekOffset = viper.GetInt("SEEK_OFFSET")
|
||||
@@ -120,6 +117,7 @@ func main() {
|
||||
|
||||
// This Function Is Responsible for Changing the Focus it uses the Focus Map and Based on it Chooses
|
||||
// the Draw Function
|
||||
views.PView.StartWatcher()
|
||||
views.SetCurrentView(views.PView)
|
||||
ui.Ui.ExpandedView.SetDrawFunc(func(s tcell.Screen, x, y, width, height int) (int, int, int, int) {
|
||||
views.GetCurrentView().Update(ui.Ui.ExpandedView)
|
||||
|
||||
Reference in New Issue
Block a user