« get me outta code hell

Don't do anything when attempting to download a group - 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-01 18:04:04 -0300
committerFlorrie <towerofnix@gmail.com>2018-06-01 18:04:04 -0300
commitfdb9e4515eab49eb58976a387b6f7df16d388579 (patch)
treed17ca2907c49fedc7c2cc294c4ea04c01a418efe
parentc283c559c777eab7a533a38a646607a91e98bd6f (diff)
Don't do anything when attempting to download a group
-rw-r--r--ui.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 0c2be5f..189aa85 100644
--- a/ui.js
+++ b/ui.js
@@ -160,7 +160,12 @@ class AppElement extends FocusElement {
   }
 
   async downloadGrouplikeItem(item) {
-    // TODO: Check if it's an item or a group
+    if (isGroup(item)) {
+      // TODO: Download all children (recursively), show a confirmation prompt
+      // if there are a lot of items (remember to flatten).
+      return
+    }
+
     const arg = item.downloaderArg
     this.recordStore.getRecord(item).downloading = true
     try {