fix bug: load last played song eventhough the queue is empty

This commit is contained in:
raziman 2021-03-03 22:08:28 +08:00
parent f364c20735
commit b4ba187be7

View File

@ -218,7 +218,7 @@ func (q *Queue) saveQueue(isQuit bool) error {
currentSongInQueue = true
}
}
if !currentSongInQueue {
if !currentSongInQueue && len(q.items) != 0 {
hashed := sha1Hex(getName(currentSongPath))
content.WriteString(hashed + "\n")
}