diff options
-rw-r--r-- | players.js | 5 | ||||
-rw-r--r-- | ui.js | 2 |
2 files changed, 3 insertions, 4 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 diff --git a/ui.js b/ui.js index e1eb528..976ef83 100644 --- a/ui.js +++ b/ui.js @@ -232,7 +232,7 @@ class AppElement extends FocusElement { return [ {label: this.playingTrack ? `("${this.playingTrack.name}")` : '(No track playing.)'}, {divider: true}, - {element: this.playingControl}, + this.playingTrack && {element: this.playingControl}, {element: this.loopingControl}, (next || previous) && {divider: true}, previous && {label: `Previous (${previous.name})`, action: () => this.playPreviousTrack(this.playingTrack)}, |