mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
Make printing progress a bit more readable
This commit is contained in:
parent
0d3c3df2f8
commit
e50499351b
@ -136,17 +136,20 @@ class Progress:
|
|||||||
if now - self.last_printed < 0.1:
|
if now - self.last_printed < 0.1:
|
||||||
return
|
return
|
||||||
|
|
||||||
progress = " ".join(
|
click.echo(f"\rDownloaded {self.vod_downloaded_count}/{self.vod_count} VODs", nl=False)
|
||||||
[
|
click.secho(f" {self.progress_perc}%", fg="blue", nl=False)
|
||||||
f"Downloaded {self.vod_downloaded_count}/{self.vod_count} VODs",
|
|
||||||
f"{blue(self.progress_perc)}%",
|
if self.estimated_total is not None:
|
||||||
f"of ~{blue(format_size(self.estimated_total))}" if self.estimated_total else "",
|
total = f"~{format_size(self.estimated_total)}"
|
||||||
f"at {blue(format_size(self.speed))}/s" if self.speed else "",
|
click.echo(f" of {blue(total)}", nl=False)
|
||||||
f"ETA {blue(format_time(self.remaining_time))}"
|
|
||||||
if self.remaining_time is not None
|
if self.speed is not None:
|
||||||
else "",
|
speed = f"{format_size(self.speed)}/s"
|
||||||
]
|
click.echo(f" at {blue(speed)}", nl=False)
|
||||||
)
|
|
||||||
|
if self.remaining_time is not None:
|
||||||
|
click.echo(f" ETA {blue(format_time(self.remaining_time))}", nl=False)
|
||||||
|
|
||||||
|
click.echo(" ", nl=False)
|
||||||
|
|
||||||
click.echo(f"\r{progress} ", nl=False)
|
|
||||||
self.last_printed = now
|
self.last_printed = now
|
||||||
|
Loading…
Reference in New Issue
Block a user