Modified youtube-dl to write new lines with the --newline switch. This
enables easier process monitoring when being called with external scripts.
This commit is contained in:
parent
906417c7c5
commit
7311fef854
2 changed files with 6 additions and 2 deletions
|
@ -305,7 +305,10 @@ class FileDownloader(object):
|
|||
"""Report download progress."""
|
||||
if self.params.get('noprogress', False):
|
||||
return
|
||||
self.to_screen(u'\r[download] %s of %s at %s ETA %s' %
|
||||
if self.params.get('newline', True):
|
||||
self.to_screen(u'\r[download] %s of %s at %s ETA %s' %
|
||||
(percent_str, data_len_str, speed_str, eta_str))
|
||||
else: self.to_screen(u'\r[download] %s of %s at %s ETA %s' %
|
||||
(percent_str, data_len_str, speed_str, eta_str), skip_eol=True)
|
||||
self.to_cons_title(u'youtube-dl - %s of %s at %s ETA %s' %
|
||||
(percent_str.strip(), data_len_str.strip(), speed_str.strip(), eta_str.strip()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue