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
1 changed files with 6 additions and 1 deletions

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)