diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-02-18 18:47:35 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-02-18 18:47:35 +0100 |
commit | 79eb0287ab34767e72e77d612775789ff9da0422 (patch) | |
tree | 78c92c62951aca26edbb3ac11ec4c098cc6a7270 | |
parent | 58994225bcd6626c2ed2bbf441577b0beaa4bf3c (diff) | |
parent | 355fc8e9443b991819b5ebf95464894bd131126c (diff) |
Merge remote-tracking branch 'glisignoli/master'
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | youtube-dl | bin | 3447 -> 59506 bytes | |||
-rw-r--r-- | youtube_dl/FileDownloader.py | 5 | ||||
-rw-r--r-- | youtube_dl/__init__.py | 3 |
4 files changed, 7 insertions, 2 deletions
@@ -85,6 +85,7 @@ which means you can modify it, redistribute it or use it however you like. --get-description simulate, quiet but print video description --get-filename simulate, quiet but print output filename --get-format simulate, quiet but print output format + --newline output progress bar as new lines --no-progress do not print progress bar --console-title display progress in console titlebar -v, --verbose print various debugging information diff --git a/youtube-dl b/youtube-dl Binary files differindex e6f05c173..ef9f33241 100755 --- a/youtube-dl +++ b/youtube-dl diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py index 4f51ed8b0..7ad9d9a76 100644 --- a/youtube_dl/FileDownloader.py +++ b/youtube_dl/FileDownloader.py @@ -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'[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())) diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index abcb4f165..035ab110c 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -202,6 +202,8 @@ def parseOpts(): verbosity.add_option('--get-format', action='store_true', dest='getformat', help='simulate, quiet but print output format', default=False) + verbosity.add_option('--newline', + action='store_true', dest='newline', help='output progress bar as new lines', default=False) verbosity.add_option('--no-progress', action='store_true', dest='noprogress', help='do not print progress bar', default=False) verbosity.add_option('--console-title', @@ -210,7 +212,6 @@ def parseOpts(): verbosity.add_option('-v', '--verbose', action='store_true', dest='verbose', help='print various debugging information', default=False) - filesystem.add_option('-t', '--title', action='store_true', dest='usetitle', help='use title in file name', default=False) filesystem.add_option('--id', |