« get me outta code hell

[Looping] indicator when queue is looping - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/backend.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-03-24 00:33:50 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-03-24 00:34:03 -0300
commitfe603bc08f14d8fb86d1d832850ee8709f307f75 (patch)
tree9cdc2e20a95d8c2a55550e8d24061a95c4e55270 /backend.js
parente6c0e708b6781473b6343a9d9aa111f215226298 (diff)
[Looping] indicator when queue is looping
Diffstat (limited to 'backend.js')
-rw-r--r--backend.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend.js b/backend.js
index 98d748b..ad13127 100644
--- a/backend.js
+++ b/backend.js
@@ -573,6 +573,7 @@ class QueuePlayer extends EventEmitter {
 
   setLoopQueueAtEnd(value) {
     this.loopQueueAtEnd = !!value
+    this.emit('set-loop-queue-at-end', !!value)
   }
 
   get remainingTracks() {
@@ -667,7 +668,8 @@ class Backend extends EventEmitter {
       'vol-up',
       'vol-down',
       'set-volume',
-      'set-pause-next-track'
+      'set-pause-next-track',
+      'set-loop-queue-at-end'
     ]) {
       queuePlayer.on(event, (...data) => {
         this.emit(event, queuePlayer, ...data)