« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui.js b/ui.js
index 1704964..f293671 100644
--- a/ui.js
+++ b/ui.js
@@ -78,7 +78,7 @@ class AppElement extends FocusElement {
     super.keyPressed(keyBuf)
   }
 
-  async queueGrouplikeItem(item) {
+  async queueGrouplikeItem(item, play = true) {
     // TODO: Check if it's an item or a group
 
     const items = this.queueGrouplike.items
@@ -96,7 +96,7 @@ class AppElement extends FocusElement {
     items.push(item)
     this.queueListingElement.buildItems()
 
-    if (!this.playingTrack) {
+    if (play && !this.playingTrack) {
       this.playGrouplikeItem(item)
     }
   }
@@ -164,7 +164,7 @@ class AppElement extends FocusElement {
       if (!nextItem) {
         return
       }
-      this.queueGrouplikeItem(nextItem)
+      this.queueGrouplikeItem(nextItem, false)
       queueIndex = queue.items.length - 1
     }