« get me outta code hell

loop queue - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-02-16 20:12:55 -0400
committer(quasar) nebula <towerofnix@gmail.com>2021-02-16 20:12:55 -0400
commit942c36453fc9317056791acade02067f01c1464d (patch)
tree86432ee6a5f6d7fb2bac49c42ee87ce421d6cd52 /ui.js
parent880e8b9b16930a9db78f162f37c6b729b6c9c814 (diff)
loop queue
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index c734a74..5a8e0ad 100644
--- a/ui.js
+++ b/ui.js
@@ -343,6 +343,7 @@ class AppElement extends FocusElement {
           {divider: true},
           playingTrack && {element: this.playingControl},
           {element: this.loopingControl},
+          {element: this.loopQueueControl},
           {element: this.pauseNextControl},
           {element: this.autoDJControl},
           {element: this.volumeSlider},
@@ -398,6 +399,12 @@ class AppElement extends FocusElement {
       getEnabled: () => this.config.canControlPlayback
     })
 
+    this.loopQueueControl = new ToggleControl('Loop queue when it ends?', {
+      setValue: val => this.SQP.setLoopQueueAtEnd(val),
+      getValue: () => this.SQP.loopQueueAtEnd,
+      getEnabled: () => this.config.canControlPlayback
+    })
+
     this.volumeSlider = new SliderElement('Volume', {
       setValue: val => this.SQP.setVolume(val),
       getValue: () => this.SQP.player.volume,