diff options
| author | Florrie <towerofnix@gmail.com> | 2020-05-03 15:30:36 -0300 | 
|---|---|---|
| committer | Florrie <towerofnix@gmail.com> | 2020-05-03 15:30:36 -0300 | 
| commit | e7a005f948415afae89a1a2aaa435d1839f4002e (patch) | |
| tree | 9edb4a9b77c593deea65e09399004081649c4f1b /backend.js | |
| parent | 9a5dfd47147aaeb844fbfc9ae8137e67f735fff1 (diff) | |
show queue length in collapsed progress info
Diffstat (limited to 'backend.js')
| -rw-r--r-- | backend.js | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/backend.js b/backend.js index ed1bd08..900a822 100644 --- a/backend.js +++ b/backend.js @@ -556,6 +556,16 @@ class QueuePlayer extends EventEmitter { this.pauseNextTrack = !!value } + get remainingTracks() { + const index = this.queueGrouplike.items.indexOf(this.playingTrack) + const length = this.queueGrouplike.items.length + if (index === -1) { + return length + } else { + return length - index - 1 + } + } + get playSymbol() { if (this.player && this.playingTrack) { if (this.player.isPaused) { | 
