Improve synchronization of playback times

Take librespot timestamps instead of approximating them in ncspot.
This commit is contained in:
Henrik Friedrichsen
2021-04-11 15:17:10 +02:00
parent 44da16dc0e
commit decf7c2aef
5 changed files with 36 additions and 27 deletions

View File

@@ -273,7 +273,7 @@ impl Queue {
pub fn toggleplayback(&self) {
match self.spotify.get_current_status() {
PlayerEvent::Playing | PlayerEvent::Paused => {
PlayerEvent::Playing(_) | PlayerEvent::Paused(_) => {
self.spotify.toggleplayback();
}
PlayerEvent::Stopped => match self.next_index() {