mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-13 05:46:21 +00:00
Merge 6182b3917cecb351f89df3fac21e89af859cb2f5 into c5098961b04ce83f4615f2a846c84f803b072639
This commit is contained in:
commit
9cf540d31a
@ -239,6 +239,9 @@ class FileDownloader(object):
|
|||||||
self.to_screen('[download] Destination: ' + filename)
|
self.to_screen('[download] Destination: ' + filename)
|
||||||
|
|
||||||
def _report_progress_status(self, msg, is_last_line=False):
|
def _report_progress_status(self, msg, is_last_line=False):
|
||||||
|
self.to_console_title('youtube-dl ' + msg)
|
||||||
|
if self.params.get('noprogress'):
|
||||||
|
return
|
||||||
fullmsg = '[download] ' + msg
|
fullmsg = '[download] ' + msg
|
||||||
if self.params.get('progress_with_newline', False):
|
if self.params.get('progress_with_newline', False):
|
||||||
self.to_screen(fullmsg)
|
self.to_screen(fullmsg)
|
||||||
@ -253,7 +256,6 @@ class FileDownloader(object):
|
|||||||
else:
|
else:
|
||||||
clear_line = ('\r\x1b[K' if sys.stderr.isatty() else '\r')
|
clear_line = ('\r\x1b[K' if sys.stderr.isatty() else '\r')
|
||||||
self.to_screen(clear_line + fullmsg, skip_eol=not is_last_line)
|
self.to_screen(clear_line + fullmsg, skip_eol=not is_last_line)
|
||||||
self.to_console_title('youtube-dl ' + msg)
|
|
||||||
|
|
||||||
def report_progress(self, s):
|
def report_progress(self, s):
|
||||||
if s['status'] == 'finished':
|
if s['status'] == 'finished':
|
||||||
@ -270,7 +272,7 @@ class FileDownloader(object):
|
|||||||
self._report_progress_status(
|
self._report_progress_status(
|
||||||
msg_template % s, is_last_line=True)
|
msg_template % s, is_last_line=True)
|
||||||
|
|
||||||
if self.params.get('noprogress'):
|
if self.params.get('noprogress') and not self.params.get('consoletitle'):
|
||||||
return
|
return
|
||||||
|
|
||||||
if s['status'] != 'downloading':
|
if s['status'] != 'downloading':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user