Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add newline before printing "Download complete" #34

Open
JohnVeness opened this issue Mar 24, 2017 · 7 comments
Open

Add newline before printing "Download complete" #34

JohnVeness opened this issue Mar 24, 2017 · 7 comments

Comments

@JohnVeness
Copy link

While you are downloading a file, the progress indicator appears. When it is finished, "Download complete" is printed. However, this overwrites the progress indicator, looking messy. So you see things like:

Download complete: 32.00 KB.15 KB of 32.00 KB, 50%

It would be good to do a newline before printing "Download complete".

Also (maybe should be a separate issue), it would be good if the progress indicator could get to 100%. It always ends earlier than that, usually 99%.

If the intention is that the "Download complete" line should overwrite the entirety of the progress line, that could be done instead of doing a newline first, but either way, the current output is messy.

@Nemris
Copy link

Nemris commented Feb 18, 2018

Moreover, the current progress bar is broken on certain shells, resulting in a flooding progress bar wall of text.

@V10lator
Copy link

Please test https://pastebin.com/5tNswBAX
Changelog:

  • Remove Python 2 support
  • Resume downloads
  • Handle server / connection errors correctly
  • Allow numbers higher than 9 for the retry count
  • Overwrite lines on CLI correctly
  • Close file handlers correctly
  • Return one in case of error so the CLI gets informed correctly

@JohnVeness
Copy link
Author

@V10lator Many thanks for this. Is your fork published on github (or similar) so we can see commits etc?

@llakssz
Copy link
Owner

llakssz commented Jan 26, 2020

@V10lator - goof stuff thank you for sharing!
Yeah if you submit a pull request I'll accept into the main repo.
Have a go, otherwise in a few days I'll just do it myself.
Thanks

@V10lator
Copy link

@JohnVeness @llakssz My PC is defective, I'm doing this with the help of a live DVD. That's why there are no commits and no pull requests.
Anyway, I'm still coding while we speak. Current (untested) changelog:

I'll try to get access to another PC, rebase everything into commits and try to pull them next days but no guarantees on that.

@llakssz
Copy link
Owner

llakssz commented Jan 26, 2020

No problem, I'm sure we all have patience! :) Thanks again for the work.

@JohnVeness
Copy link
Author

Please test https://pastebin.com/5tNswBAX

Hi @V10lator , the pastebin link has expired. Do you have your latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants