« get me outta code hell

Don't process metadata of non-tracks - 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-10-15 22:36:25 -0300
committerFlorrie <towerofnix@gmail.com>2019-10-15 22:36:47 -0300
commitb8ce81ebd53b261658b51ed8ff89bd54ef97ff6b (patch)
tree3278b22bf0f6fbf61ada449bf30521455cdcdb02
parentcb4835e4eb3df8cfddfe33b94cc1afb202615acf (diff)
Don't process metadata of non-tracks
This fixes mtui crashing whenever you process the metadata of any group
including a non-track too.
-rw-r--r--backend.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend.js b/backend.js
index f2a9d99..b3e6564 100644
--- a/backend.js
+++ b/backend.js
@@ -629,7 +629,7 @@ class Backend extends EventEmitter {
     if (isGroup(item)) {
       const results = await Promise.all(item.items.map(x => this.processMetadata(x, reprocess, false)))
       counter += results.reduce((acc, n) => acc + n, 0)
-    } else process: {
+    } else if (isTrack(item)) process: {
       if (!reprocess && this.getMetadataFor(item)) {
         break process
       }