« get me outta code hell

Fix issue with playing tracks directly from queue - mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-06-03 19:14:35 -0300
committerFlorrie <towerofnix@gmail.com>2018-06-03 19:14:35 -0300
commite13e4d57302cab12af7e43b431052cc3d2d32e9a (patch)
treebca16026893e0ce40df4ade5ce407298f1c471f0
parente06d33d7e003e9dd61956d64428205ea3b5ebda6 (diff)
Fix issue with playing tracks directly from queue
-rw-r--r--todo.txt5
-rw-r--r--ui.js4
2 files changed, 7 insertions, 2 deletions
diff --git a/todo.txt b/todo.txt
index 4b8f1e8..42a5058 100644
--- a/todo.txt
+++ b/todo.txt
@@ -17,3 +17,8 @@ TODO: Scroll to the selected track once it starts playing when selected from
 
 TODO: process.on('SIGWINCH', () => ...) -- detect terminal resize!!
       (Done!)
+
+TODO: Pressing enter in the queue seems to not be doing the right thing?
+      It should NOT move the selected item anywhere in the queue; it should
+      just select and play that track.
+      (Done!)
diff --git a/ui.js b/ui.js
index affe312..02c77bb 100644
--- a/ui.js
+++ b/ui.js
@@ -53,9 +53,9 @@ class AppElement extends FocusElement {
     this.paneRight.addChild(this.queueListingElement)
     this.form.addInput(this.queueListingElement, false)
 
-    this.queueListingElement.on('select (enter)', item => this.playGrouplikeItem(item))
+    this.queueListingElement.on('select (enter)', item => this.playGrouplikeItem(item, false))
     this.queueListingElement.on('select (space)', item => this.handleSpacePressed(
-      () => this.playGrouplikeItem(item)))
+      () => this.playGrouplikeItem(item, false)))
 
     this.playbackPane = new Pane()
     this.addChild(this.playbackPane)