« get me outta code hell

Don't unqueue currently-playing track - 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>2019-01-28 12:17:24 -0400
committerFlorrie <towerofnix@gmail.com>2019-01-28 12:19:12 -0400
commitbd1870aff19e8e5f23131316f6833496d0f3827e (patch)
tree4187917e4a707eccd54f21ea4bc79460896c1e95
parent94e78b32499c71db1e32262e4edbfc3ebc4b120b (diff)
Don't unqueue currently-playing track
-rw-r--r--ui.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index 67f1bf4..0ae5266 100644
--- a/ui.js
+++ b/ui.js
@@ -692,6 +692,12 @@ class AppElement extends FocusElement {
         return
       }
 
+      // Don't unqueue the currently-playing track - this usually causes more
+      // trouble than it's worth.
+      if (item === this.playingTrack) {
+        return
+      }
+
       const items = this.queueGrouplike.items
       if (items.includes(item)) {
         items.splice(items.indexOf(item), 1)