« get me outta code hell

Always reumse when playing a new track - 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>2019-05-29 11:49:29 -0300
committerFlorrie <towerofnix@gmail.com>2019-05-29 11:49:49 -0300
commit420d17be1f42de06448026df78688a959e5fe8b3 (patch)
tree128cd6f61b0bb19d041f2c3f890bd8c47806c4d9 /players.js
parent565c984e563be3bc37c9ab5674ee088f2ea718c0 (diff)
Always reumse when playing a new track
This behavior got changed recently, where the player being paused would
carry through across tracks. It no longer does that.
Diffstat (limited to 'players.js')
-rw-r--r--players.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/players.js b/players.js
index a1a3a13..2f7a574 100644
--- a/players.js
+++ b/players.js
@@ -11,6 +11,7 @@ class Player extends EventEmitter {
 
     this.disablePlaybackStatus = false
     this.isLooping = false
+    this.isPaused = false
     this.volume = 100
   }
 
@@ -62,9 +63,6 @@ module.exports.MPVPlayer = class extends Player {
     if (this.isLooping) {
       opts.unshift('--loop')
     }
-    if (this.isPaused) {
-      opts.unshift('--pause')
-    }
     opts.unshift('--volume', this.volume)
     return opts
   }
@@ -73,6 +71,7 @@ module.exports.MPVPlayer = class extends Player {
     // The more powerful MPV player. MPV is virtually impossible for a human
     // being to install; if you're having trouble with it, try the SoX player.
 
+    this.isPaused = false
     this.process = spawn('mpv', this.getMPVOptions(file))
 
     let lastPercent = 0