« 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.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 26512e4..3e6cdf6 100644
--- a/ui.js
+++ b/ui.js
@@ -562,7 +562,10 @@ class AppElement extends FocusElement {
       this.queueGrouplikeItem(item, false, this.playingTrack)
     }
 
-    // TODO: Check if it's an item or a group
+    // If it's a group, play the first track.
+    if (isGroup(item)) {
+      item = flattenGrouplike(item).items[0]
+    }
 
     playTrack: {
       // No downloader argument? That's no good - stop here.