From e7a005f948415afae89a1a2aaa435d1839f4002e Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 3 May 2020 15:30:36 -0300 Subject: show queue length in collapsed progress info --- backend.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'backend.js') 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) { -- cgit 1.3.0-6-gf8a5