Restart queue if pressing play when stopped (#399)

* Restart queue if pressing play when stopped

* Remove FinishedTrack from match

* Formatting
This commit is contained in:
André Andersson
2021-01-19 21:47:41 +01:00
committed by GitHub
parent cfb91493a5
commit 92335594bc
3 changed files with 14 additions and 9 deletions

View File

@@ -890,11 +890,7 @@ impl Spotify {
}
pub fn toggleplayback(&self) {
let status = self
.status
.read()
.expect("could not acquire read lock on player state");
match *status {
match self.get_current_status() {
PlayerEvent::Playing => self.pause(),
PlayerEvent::Paused => self.play(),
_ => (),