From 3e76f3688b858ec7ee4868352c8fd61e7d629bc0 Mon Sep 17 00:00:00 2001 From: Jelle Glebbeek Date: Sun, 21 Mar 2021 01:10:33 +0100 Subject: [PATCH] Fix progressbar only starts moving when the first video gets downloaded --- modules/download/DownloadQueryList.js | 1 + modules/types/ProgressBar.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/download/DownloadQueryList.js b/modules/download/DownloadQueryList.js index 3846fb2..c2d047c 100644 --- a/modules/download/DownloadQueryList.js +++ b/modules/download/DownloadQueryList.js @@ -70,6 +70,7 @@ class DownloadQueryList { resolve(); } }); + this.progressBar.updatePlaylist(this.done - this.cancelled, this.length - this.cancelled); } })) diff --git a/modules/types/ProgressBar.js b/modules/types/ProgressBar.js index 27eb3a0..3061fdb 100644 --- a/modules/types/ProgressBar.js +++ b/modules/types/ProgressBar.js @@ -18,7 +18,9 @@ class ProgressBar { } done(isAudio) { - this.manager.updateProgress(this.video, {finished: true, isAudio: this.video.formats.length === 0 ? null : isAudio, isPlaylist: this.isUnifiedPlaylist()}) + let audio = isAudio; + if(!this.isUnifiedPlaylist()) audio = this.video.formats.length === 0 ? null : isAudio; + this.manager.updateProgress(this.video, {finished: true, isAudio: audio, isPlaylist: this.isUnifiedPlaylist()}) } isUnifiedPlaylist() {