[output] write download progress indicator to stderr

pull/2091/head
Mike Fährmann 3 years ago
parent 604d5b8bb2
commit da14b3fe9f
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1,5 +1,7 @@
# Changelog
## Unreleased
## 1.19.3 - 2021-11-27
### Additions
- [dynastyscans] add `manga` extractor ([#2035](https://github.com/mikf/gallery-dl/issues/2035))

@ -296,10 +296,10 @@ class TerminalOutput(NullOutput):
bdl = util.format_value(bytes_downloaded)
bps = util.format_value(bytes_per_second)
if bytes_total is None:
print("\r{:>7}B {:>7}B/s ".format(bdl, bps), end="")
sys.stderr.write("\r{:>7}B {:>7}B/s ".format(bdl, bps))
else:
print("\r{:>3}% {:>7}B {:>7}B/s ".format(
bytes_downloaded * 100 // bytes_total, bdl, bps), end="")
sys.stderr.write("\r{:>3}% {:>7}B {:>7}B/s ".format(
bytes_downloaded * 100 // bytes_total, bdl, bps))
class ColorOutput(TerminalOutput):

@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.19.3"
__version__ = "1.20.0-dev"

Loading…
Cancel
Save