From be867b03f56b53892d55e573502713b20b88bec1 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 24 Sep 2021 03:35:29 +0530 Subject: [PATCH] bugfix for bd50a52b0d7247cdbf205eb851ce33ae4b89c516 --- yt_dlp/downloader/common.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yt_dlp/downloader/common.py b/yt_dlp/downloader/common.py index 53e83d2c3..bb0614037 100644 --- a/yt_dlp/downloader/common.py +++ b/yt_dlp/downloader/common.py @@ -264,8 +264,7 @@ class FileDownloader(object): self._multiline.print_at_line(fullmsg, progress_line) else: if compat_os_name == 'nt' or not sys.stderr.isatty(): - prev_len = getattr(self, '_report_progress_prev_line_length', - 0) + prev_len = getattr(self, '_report_progress_prev_line_length', 0) if prev_len > len(fullmsg): fullmsg += ' ' * (prev_len - len(fullmsg)) self._report_progress_prev_line_length = len(fullmsg) @@ -288,7 +287,7 @@ class FileDownloader(object): s['_elapsed_str'] = self.format_seconds(s['elapsed']) msg_template += ' in %(_elapsed_str)s' self._report_progress_status( - msg_template % s, progress_line=s.get('progress_idx')) + msg_template % s, is_last_line=True, progress_line=s.get('progress_idx')) return if self.params.get('noprogress'):