diff options
author | Florrie <towerofnix@gmail.com> | 2018-05-30 23:54:39 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-05-30 23:54:39 -0300 |
commit | 12e2b37d59b29343e4543abbfb2416625a1ab79f (patch) | |
tree | dd41dba063dc629c077787f54f5af47a8aa7e90e | |
parent | c67983ea0c540e52ca8bb60b8136ecade9447b79 (diff) |
Fix duplicate sound problem, hopefully
-rw-r--r-- | ui.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui.js b/ui.js index 1704964..f293671 100644 --- a/ui.js +++ b/ui.js @@ -78,7 +78,7 @@ class AppElement extends FocusElement { super.keyPressed(keyBuf) } - async queueGrouplikeItem(item) { + async queueGrouplikeItem(item, play = true) { // TODO: Check if it's an item or a group const items = this.queueGrouplike.items @@ -96,7 +96,7 @@ class AppElement extends FocusElement { items.push(item) this.queueListingElement.buildItems() - if (!this.playingTrack) { + if (play && !this.playingTrack) { this.playGrouplikeItem(item) } } @@ -164,7 +164,7 @@ class AppElement extends FocusElement { if (!nextItem) { return } - this.queueGrouplikeItem(nextItem) + this.queueGrouplikeItem(nextItem, false) queueIndex = queue.items.length - 1 } |