« get me outta code hell

fix process-metadata pausing context menu - 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>2020-04-30 09:54:58 -0300
committerFlorrie <towerofnix@gmail.com>2020-04-30 09:54:58 -0300
commit83689950b99a0879f32549bbada1c7778ac2d3bb (patch)
treef432496d6fff00ddf70ffe08d78a5b6b8de55476
parent4c9edfcbcbf5d161f288dd508f87a3551faa5979 (diff)
fix process-metadata pausing context menu
-rw-r--r--todo.txt3
-rw-r--r--ui.js6
2 files changed, 6 insertions, 3 deletions
diff --git a/todo.txt b/todo.txt
index 722e79c..bd75904 100644
--- a/todo.txt
+++ b/todo.txt
@@ -506,3 +506,6 @@ TODO: "Lock scroll to cursor" option in queue listing. Will make the listing
        user interface.)
 
 TODO: Revisit labels and notes features! They're commented out for now :P
+
+TODO: Pressing "Reveal" should focus the main listing. This is prrrrobably a
+      case of context menu selection-restoring being a pain.
diff --git a/ui.js b/ui.js
index 43fd2b3..021776f 100644
--- a/ui.js
+++ b/ui.js
@@ -1069,9 +1069,9 @@ class AppElement extends FocusElement {
         canControlQueue && isPlayable(item) && {label: 'Queue!', action: emitControls(false)},
         {divider: true},
 
-        canProcessMetadata && isGroup(item) && {label: 'Process metadata (new entries)', action: () => this.processMetadata(item, false)},
-        canProcessMetadata && isGroup(item) && {label: 'Process metadata (reprocess)', action: () => this.processMetadata(item, true)},
-        canProcessMetadata && isTrack(item) && {label: 'Process metadata', action: () => this.processMetadata(item, true)},
+        canProcessMetadata && isGroup(item) && {label: 'Process metadata (new entries)', action: () => setTimeout(() => this.processMetadata(item, false))},
+        canProcessMetadata && isGroup(item) && {label: 'Process metadata (reprocess)', action: () => setTimeout(() => this.processMetadata(item, true))},
+        canProcessMetadata && isTrack(item) && {label: 'Process metadata', action: () => setTimeout(() => this.processMetadata(item, true))},
         isOpenable(item) && item.url.endsWith('.json') && {label: 'Open (JSON Playlist)', action: () => this.openSpecialOrThroughSystem(item)},
         isOpenable(item) && {label: 'Open (System)', action: () => this.openThroughSystem(item)},
         /*