Only go to previous track if seek progress is under 3s
@@ -549,6 +549,9 @@ impl App {
pub fn previous_track(&mut self) {
if let (Some(spotify), Some(device_id)) = (&self.spotify, &self.client_config.device_id) {
+ if self.song_progress_ms >= 3_000 {
+ self.seek(0);
+ } else {
match spotify.previous_track(Some(device_id.to_string())) {
Ok(()) => {
self.get_current_playback();
@@ -559,6 +562,7 @@ impl App {
};
}
}
+ }
pub fn start_playback(
&mut self,
