From 0e9b316165f8b6585d5822a8a3b8199b7ec3e671 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 30 Jul 2019 21:49:04 -0300 Subject: "Pause when this track ends" option --- players.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'players.js') diff --git a/players.js b/players.js index 0c296b3..a61e545 100644 --- a/players.js +++ b/players.js @@ -63,6 +63,9 @@ 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 } @@ -71,7 +74,6 @@ 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 -- cgit 1.3.0-6-gf8a5