« get me outta code hell

misc minor mpv player stuff - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2020-02-04 21:54:50 -0400
committerFlorrie <towerofnix@gmail.com>2020-02-04 22:02:32 -0400
commitd14770b5f5ec8aaa350d7b235a6c4e5d40dd9a2d (patch)
treec6d3c5e2ea0581f1c99fb7dbc7ee469e00e64a2f
parentc2893e7709d51c232b6a6c868bd2fa452d6f5932 (diff)
misc minor mpv player stuff
-rw-r--r--players.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/players.js b/players.js
index 24372c9..651b519 100644
--- a/players.js
+++ b/players.js
@@ -66,7 +66,7 @@ module.exports.MPVPlayer = class extends Player {
     if (this.isPaused) {
       opts.unshift('--pause')
     }
-    opts.unshift('--volume', this.volume)
+    opts.unshift('--volume=' + this.volume)
     return opts
   }
 
@@ -99,13 +99,11 @@ module.exports.MPVPlayer = class extends Player {
           // have to specify them every time it loops. We do that whenever the
           // position in the song decreases, since that means it may have
           // looped.
-          if (this.isLooping) {
-            this.sendCommand('set loop yes')
-          } else {
-            this.sendCommand('set loop no')
-          }
+          this.setLoop(this.isLooping)
         }
 
+        lastPercent = parseInt(percent)
+
         this.printStatusLine(getTimeStrings({curHour, curMin, curSec, lenHour, lenMin, lenSec}))
       }
     })