diff options
author | Florrie <towerofnix@gmail.com> | 2018-07-05 10:28:09 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2018-07-05 10:28:25 -0300 |
commit | 48fce96444f720263409ec548d66dfbae53dcc6b (patch) | |
tree | e32718375657e4cf2ca38ca8ffd246f8689e3fdc /ui.js | |
parent | fe4db4e4f093697b8b35cd63c80c16695fedb2ca (diff) |
Shift+Q to play next
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui.js b/ui.js index 4228650..4b64017 100644 --- a/ui.js +++ b/ui.js @@ -107,6 +107,7 @@ class AppElement extends FocusElement { () => handleSelectFromMain(item))) grouplikeListing.on('queue', item => this.queueGrouplikeItem(item)) grouplikeListing.on('queue (shuffled)', item => this.shuffleQueueGrouplikeItem(item)) + grouplikeListing.on('queue (play next)', item => this.queueGrouplikeItem(item, true, this.playingTrack)) const handleSelectFromPathElement = item => { this.form.selectInput(grouplikeListing) @@ -633,7 +634,7 @@ class GrouplikeListingElement extends FocusElement { if (this.grouplike.items.length) { for (const item of this.grouplike.items) { const itemElement = new GrouplikeItemElement(item, this.recordStore) - for (const evtName of ['download', 'remove', 'select (space)', 'select (enter)', 'queue', 'queue (shuffled)']) { + for (const evtName of ['download', 'remove', 'select (space)', 'select (enter)', 'queue', 'queue (shuffled)', 'queue (play next)']) { itemElement.on(evtName, () => this.emit(evtName, item)) } form.addInput(itemElement) @@ -788,7 +789,11 @@ class GrouplikeItemElement extends Button { if (keyBuf[0] === 'q'.charCodeAt(0)) { this.emit('queue') } else { - this.emit('queue (shuffled)') + if (isGroup(this.item)) { + this.emit('queue (shuffled)') + } else { + this.emit('queue (play next)') + } } } else if (telc.isBackspace(keyBuf)) { this.emit('remove') |