Fix: Restore previous Previous behavior (#1111)

* Fix: Restore previous `Previous` behavior

Fixes #1110
This commit is contained in:
Henrik Friedrichsen
2023-04-04 14:54:32 +02:00
committed by GitHub
parent b0db0da3ef
commit d19d897e75

View File

@@ -1,6 +1,7 @@
use std::collections::HashMap;
use std::error::Error;
use std::sync::Arc;
use std::time::Duration;
use tokio::sync::mpsc;
use tokio_stream::wrappers::UnboundedReceiverStream;
use tokio_stream::StreamExt;
@@ -317,7 +318,11 @@ impl MprisPlayer {
}
fn previous(&self) {
self.queue.previous()
if self.spotify.get_current_progress() < Duration::from_secs(5) {
self.queue.previous();
} else {
self.spotify.seek(0);
}
}
fn pause(&self) {