« get me outta code hell

re-send loop when moving backwards, not forwards - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/players.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-02-04 21:05:27 -0400
committerFlorrie <towerofnix@gmail.com>2020-02-04 21:05:27 -0400
commit01fe08528446f7dbc64c2b662967796ed7607d01 (patch)
tree523f1cc1fa027dfcee9e598c7d2de0b0bbccb07e /players.js
parent0d8d353ac4a232c72bef33a86fc3237383416134 (diff)
re-send loop when moving backwards, not forwards
Diffstat (limited to 'players.js')
-rw-r--r--players.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/players.js b/players.js
index a61e545..24372c9 100644
--- a/players.js
+++ b/players.js
@@ -94,8 +94,7 @@ module.exports.MPVPlayer = class extends Player {
           percent // ###%
         ] = match.slice(1)
 
-        if (lastPercent < parseInt(percent)) {
-          lastPercent = parseInt(percent)
+        if (parseInt(percent) < lastPercent) {
           // mpv forgets commands you sent it whenever it loops, so you
           // have to specify them every time it loops. We do that whenever the
           // position in the song decreases, since that means it may have