1
0
mirror of https://github.com/apognu/otter synced 2025-02-03 22:57:33 +01:00

Seek to start of song when nexting (progress cache would remain at the progress of the previous track.

This commit is contained in:
Antoine POPINEAU 2020-05-30 17:49:08 +02:00
parent 3180c886a2
commit 3fb0bb55a4
No known key found for this signature in database
GPG Key ID: A78AC64694F84063

View File

@ -177,7 +177,12 @@ class PlayerService : Service() {
is Command.ToggleState -> toggle()
is Command.SetState -> state(message.state)
is Command.NextTrack -> player.next()
is Command.NextTrack -> {
player.next()
Cache.set(this@PlayerService, "progress", "0".toByteArray())
ProgressBus.send(0, 0, 0)
}
is Command.PreviousTrack -> previousTrack()
is Command.Seek -> progress(message.progress)