mirror of
https://github.com/issadarkthing/gomu.git
synced 2025-04-28 13:48:53 +08:00
fix: playing song is saved when queue is empty
This commit is contained in:
parent
ca5051fa13
commit
ae123b4db1
@ -210,6 +210,9 @@ func (p *PlayingBar) setDefault() {
|
|||||||
"%s ┣%s┫ %s", "00:00", strings.Repeat("━", width/2), "00:00",
|
"%s ┣%s┫ %s", "00:00", strings.Repeat("━", width/2), "00:00",
|
||||||
)
|
)
|
||||||
p.text.SetText(text)
|
p.text.SetText(text)
|
||||||
|
if p.albumPhoto != nil {
|
||||||
|
p.albumPhoto.Clear()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skips the current playing song
|
// Skips the current playing song
|
||||||
|
3
queue.go
3
queue.go
@ -210,8 +210,7 @@ func (q *Queue) saveQueue() error {
|
|||||||
currentSongInQueue = true
|
currentSongInQueue = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !currentSongInQueue {
|
if !currentSongInQueue && len(q.items) != 0 {
|
||||||
// if !currentSongInQueue && len(q.items) != 0 {
|
|
||||||
hashed := sha1Hex(getName(currentSongPath))
|
hashed := sha1Hex(getName(currentSongPath))
|
||||||
content.WriteString(hashed + "\n")
|
content.WriteString(hashed + "\n")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user