From c1079bdda932d8a8eea02e95665f6290e84a5bb1 Mon Sep 17 00:00:00 2001 From: Damian Kacperski <7dami77@gmail.com> Date: Sun, 21 Jan 2024 05:10:23 +0100 Subject: [PATCH] Fix handling of single click on previous track button --- src/components/nowPlayingBar/nowPlayingBar.js | 2 +- src/components/remotecontrol/remotecontrol.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/nowPlayingBar/nowPlayingBar.js b/src/components/nowPlayingBar/nowPlayingBar.js index bb823cb1e..3da64dac5 100644 --- a/src/components/nowPlayingBar/nowPlayingBar.js +++ b/src/components/nowPlayingBar/nowPlayingBar.js @@ -180,7 +180,7 @@ function bindEvents(elem) { // to the previous track, unless we are at the first track so no previous track exists. // currentTime is in msec. - if (playbackManager.currentTime(currentPlayer) >= 5 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 1) { + if (playbackManager.currentTime(currentPlayer) >= 5 * 1000 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 0) { playbackManager.seekPercent(0, currentPlayer); // This is done automatically by playbackManager, however, setting this here gives instant visual feedback. // TODO: Check why seekPercent doesn't reflect the changes inmmediately, so we can remove this workaround. diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index 99862a4ce..1120e03c0 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -784,7 +784,7 @@ export default function () { // to the previous track, unless we are at the first track so no previous track exists. // currentTime is in msec. - if (playbackManager.currentTime(currentPlayer) >= 5 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 1) { + if (playbackManager.currentTime(currentPlayer) >= 5 * 1000 || playbackManager.getCurrentPlaylistIndex(currentPlayer) <= 0) { playbackManager.seekPercent(0, currentPlayer); // This is done automatically by playbackManager, however, setting this here gives instant visual feedback. // TODO: Check why seekPercent doesn't reflect the changes inmmediately, so we can remove this workaround.