mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-28 13:48:53 +08:00
fix a minor bug that the song title is not set after pause
This commit is contained in:
parent
c954c13e16
commit
ffeef53510
7
start.go
7
start.go
@ -470,10 +470,15 @@ func start(application *tview.Application, args Args) {
|
|||||||
|
|
||||||
init := false
|
init := false
|
||||||
gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) {
|
gomu.app.SetAfterDrawFunc(func(_ tcell.Screen) {
|
||||||
if !init && !gomu.player.IsRunning() {
|
if !init {
|
||||||
gomu.playingBar.setDefault()
|
gomu.playingBar.setDefault()
|
||||||
init = true
|
init = true
|
||||||
}
|
}
|
||||||
|
if gomu.player.IsRunning() {
|
||||||
|
gomu.playingBar.setSongTitle(gomu.player.GetCurrentSong().Name())
|
||||||
|
} else {
|
||||||
|
gomu.playingBar.setDefault()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
go populateAudioLength(gomu.playlist.GetRoot())
|
go populateAudioLength(gomu.playlist.GetRoot())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user