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

@@ -30,8 +30,8 @@ struct MprisState(String, Option<Playable>);
fn get_playbackstatus(spotify: Spotify) -> String {
match spotify.get_current_status() {
PlayerEvent::Playing | PlayerEvent::FinishedTrack => "Playing",
PlayerEvent::Paused => "Paused",
PlayerEvent::Playing(_) | PlayerEvent::FinishedTrack => "Playing",
PlayerEvent::Paused(_) => "Paused",
_ => "Stopped",
}
.to_string()