mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-28 13:48:53 +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)
|
return tracerr.Wrap(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
currentSong := gomu.player.GetCurrentSong()
|
if !gomu.player.IsRunning() {
|
||||||
if currentSong == nil {
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentSong := gomu.player.GetCurrentSong()
|
||||||
if node.name == currentSong.Name() {
|
if node.name == currentSong.Name() {
|
||||||
gomu.queue.enqueue(newNode)
|
gomu.queue.enqueue(newNode)
|
||||||
gomu.queue.pushFront(newNode)
|
gomu.queue.pushFront(newNode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user