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

@@ -72,14 +72,14 @@ impl View for StatusBar {
let state_icon = if self.use_nerdfont {
match self.spotify.get_current_status() {
PlayerEvent::Playing => "\u{f909} ",
PlayerEvent::Paused => "\u{f8e3} ",
PlayerEvent::Playing(_) => "\u{f909} ",
PlayerEvent::Paused(_) => "\u{f8e3} ",
PlayerEvent::Stopped | PlayerEvent::FinishedTrack => "\u{f9da} ",
}
} else {
match self.spotify.get_current_status() {
PlayerEvent::Playing => "",
PlayerEvent::Paused => "▮▮",
PlayerEvent::Playing(_) => "",
PlayerEvent::Paused(_) => "▮▮",
PlayerEvent::Stopped | PlayerEvent::FinishedTrack => "",
}
}