From 1ea81dae03a569069b99d75c5c87bfec00f48469 Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Wed, 22 Mar 2017 20:26:54 +0200 Subject: [PATCH] Check filesizes list length instead of filenames list --- youtube_dl_gui/downloadmanager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl_gui/downloadmanager.py b/youtube_dl_gui/downloadmanager.py index cf3ecef..e041566 100644 --- a/youtube_dl_gui/downloadmanager.py +++ b/youtube_dl_gui/downloadmanager.py @@ -186,8 +186,8 @@ class DownloadItem(object): if "status" in stats_dict: # If we are post processing try to calculate the size of # the output file since youtube-dl does not - if stats_dict["status"] == self.ACTIVE_STAGES[2] and not len(self.filenames) % 3: - post_proc_filesize = self.filesizes[-2] + self.filesizes[-1] + if stats_dict["status"] == self.ACTIVE_STAGES[2] and len(self.filesizes) == 2: + post_proc_filesize = self.filesizes[0] + self.filesizes[1] self.filesizes.append(post_proc_filesize) self.progress_stats["filesize"] = format_bytes(post_proc_filesize)