FunKiiU icon indicating copy to clipboard operation
FunKiiU copied to clipboard

Add newline before printing "Download complete"

Open JohnVeness opened this issue 7 years ago • 7 comments

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.

JohnVeness avatar Mar 24 '17 10:03 JohnVeness

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

Nemris avatar Feb 18 '18 18:02 Nemris

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

V10lator avatar Jan 26 '20 11:01 V10lator

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

JohnVeness avatar Jan 26 '20 12:01 JohnVeness

@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

llakssz avatar Jan 26 '20 14:01 llakssz

@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:

  • 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
  • Fis issue #45
  • Use a default chunk size of 4 kb / fix bug #35
  • Fix bug #33

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.

V10lator avatar Jan 26 '20 15:01 V10lator

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

llakssz avatar Jan 26 '20 15:01 llakssz

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

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

JohnVeness avatar Feb 22 '21 12:02 JohnVeness