From ffeef535106534f1f42806113acb93968a842f61 Mon Sep 17 00:00:00 2001 From: tramhao Date: Tue, 2 Mar 2021 12:27:23 +0800 Subject: [PATCH] fix a minor bug that the song title is not set after pause --- start.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/start.go b/start.go index 3ee6509..6f42f25 100644 --- a/start.go +++ b/start.go @@ -470,10 +470,15 @@ func start(application *tview.Application, args Args) { init := false gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) { - if !init && !gomu.player.IsRunning() { + if !init { gomu.playingBar.setDefault() init = true } + if gomu.player.IsRunning() { + gomu.playingBar.setSongTitle(gomu.player.GetCurrentSong().Name()) + } else { + gomu.playingBar.setDefault() + } }) go populateAudioLength(gomu.playlist.GetRoot())