« 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--todo.txt4
-rw-r--r--ui.js5
2 files changed, 9 insertions, 0 deletions
diff --git a/todo.txt b/todo.txt
index fc268c8..59a6d23 100644
--- a/todo.txt
+++ b/todo.txt
@@ -69,3 +69,7 @@ TODO: Make PathElements selectable (again).
 TODO: Make the tabber UI show handy information, like what tab you've got
       selected, how many tabs there are, the usual (same way a browser tabber
       works).
+
+TODO: A "bookmarked playlists" list in the UI, so you can quickly load up
+      playlists you often use. (Let anything go here, like YT playlist URLs,
+      file paths, etc.)
diff --git a/ui.js b/ui.js
index 148d2a6..ab85bf7 100644
--- a/ui.js
+++ b/ui.js
@@ -384,6 +384,11 @@ class AppElement extends FocusElement {
       return
     }
 
+    // Don't start downloading an item if we're already downloading it!
+    if (this.recordStore.getRecord(item).downloading) {
+      return
+    }
+
     const arg = item.downloaderArg
     this.recordStore.getRecord(item).downloading = true
     try {