mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-26 13:49:21 +08:00
minor fix: panic when rename sone and not playing
This commit is contained in:
parent
6976541a2a
commit
8db110282a
@ -867,10 +867,11 @@ func (p *Playlist) refreshByNode(node *AudioFile, newName string) error {
|
||||
return tracerr.Wrap(err)
|
||||
}
|
||||
|
||||
currentSong := gomu.player.GetCurrentSong()
|
||||
if currentSong == nil {
|
||||
if !gomu.player.IsRunning() {
|
||||
return nil
|
||||
}
|
||||
|
||||
currentSong := gomu.player.GetCurrentSong()
|
||||
if node.name == currentSong.Name() {
|
||||
gomu.queue.enqueue(newNode)
|
||||
gomu.queue.pushFront(newNode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user