mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 15:16:52 +01:00
bugfix for bd50a52b0d
This commit is contained in:
parent
1813a6ccd4
commit
be867b03f5
@ -264,8 +264,7 @@ def _report_progress_status(self, msg, is_last_line=False, progress_line=None):
|
|||||||
self._multiline.print_at_line(fullmsg, progress_line)
|
self._multiline.print_at_line(fullmsg, progress_line)
|
||||||
else:
|
else:
|
||||||
if compat_os_name == 'nt' or not sys.stderr.isatty():
|
if compat_os_name == 'nt' or not sys.stderr.isatty():
|
||||||
prev_len = getattr(self, '_report_progress_prev_line_length',
|
prev_len = getattr(self, '_report_progress_prev_line_length', 0)
|
||||||
0)
|
|
||||||
if prev_len > len(fullmsg):
|
if prev_len > len(fullmsg):
|
||||||
fullmsg += ' ' * (prev_len - len(fullmsg))
|
fullmsg += ' ' * (prev_len - len(fullmsg))
|
||||||
self._report_progress_prev_line_length = len(fullmsg)
|
self._report_progress_prev_line_length = len(fullmsg)
|
||||||
@ -288,7 +287,7 @@ def report_progress(self, s):
|
|||||||
s['_elapsed_str'] = self.format_seconds(s['elapsed'])
|
s['_elapsed_str'] = self.format_seconds(s['elapsed'])
|
||||||
msg_template += ' in %(_elapsed_str)s'
|
msg_template += ' in %(_elapsed_str)s'
|
||||||
self._report_progress_status(
|
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
|
return
|
||||||
|
|
||||||
if self.params.get('noprogress'):
|
if self.params.get('noprogress'):
|
||||||
|
Loading…
Reference in New Issue
Block a user