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

Clean up alignment of progress percentage #41

Open
roskakori opened this issue May 30, 2021 · 0 comments · May be fixed by #42
Open

Clean up alignment of progress percentage #41

roskakori opened this issue May 30, 2021 · 0 comments · May be fixed by #42

Comments

@roskakori
Copy link

roskakori commented May 30, 2021

The --progress percentage currently is left aligned, making the progress bar jump to the right as the download completes, e.g.:

        0% [                                                  ]
        10% [=====                                             ]
        100% [==================================================]

I managed to reproduce this with python 3.7, macOS 11.4 in a zsh terminal.

roskakori added a commit to roskakori/humblebundle-downloader that referenced this issue May 30, 2021
@roskakori roskakori linked a pull request May 30, 2021 that will close this issue
missytake added a commit to missytake/humblebundle-downloader that referenced this issue Jan 31, 2022
xtream1101#41 Clean up alignment of progress percentage.
Greeley added a commit to Greeley/humblebundle-downloader that referenced this issue Mar 31, 2024
* xtream1101#41 Clean up alignment of progress percentage.

* Use a temporary file to prevent cache file corruption when interrupted.

* Add timeouts/retries

Add timeouts to prevent downloads from timing out in minutes.
Add retries to all downloads (the only way I was able to
download my entire library).

* Suppress "No url found" warning for 0 byte entries

This commit suppresses the "No url found" warning for entries
which contain a "human_size" field set to "0 bytes".

When downloading a product, occasionally an entry in the
"download_struct" won't have a viable URL to download.
In every case I observed, this was harmless; the entry
was extra information, like a link to a web page where
you could download the soundtrack for free ("World Of Goo"),
or a link to a help page on which APK to choose ("Costume Quest"),
or some sort of... Javascript soundtrack player? ("Dustforce").

Also, in every case I observed, the entry in the "download_struct"
contained a "human_size" field set to the exact string "0 bytes".
This seems like a hint in the JSON blob saying: yeah, this entry
doesn't have anything for you to download, you can ignore it.

It's a little worrying to the casual user of the tool when it prints
these error messages.  But it seems like it's harmless.  So let's
suppress these error messages when "human_size" is "0 bytes".

* Content-type argument. Possible to download bittorrent files.

* Fixed Changes that got wiped
- don't cancel a rebase.

* multi-processing.
- lambda to be pedantic about the type map expects.
- added exception package with InvalidCookieException.py
- added multiprocess package with exorcise_daemons.py
- exorcise_daemons#ExorcistPool creates multiprocessing pools without creating daemons
- mapped self._process_order_id to multiprocess pool of purchase_keys.

* multiprocessing
- Downloading: basename now prints to avoid so much console spam.
- join the pool to finalize it properly.

* removed unnecessary import to base __init__.py that I pushed accidentally.

* Process Safe File Writing
- created CacheData class in cache.py
- read cache data in for every write.

* _get_trove_products
- updated trove_base_url

* Caching Update: (#4)

- caching with json is pretty crazy, so I've switched it to a csv.
- added _strtobool
- added _strtonone will be useful when converting old json cache
- cache object inheriting list.
- file operations moved to file_ops.py
- readability changes... sorry
- changes for consistency across trove and non-trove cache

* Fixed Changes that got wiped
- don't cancel a rebase.

* Rebased on missytake/main
- multi-processing
- file safety
- no tmp cache anymore
- cache is a visible file.
- intellij .idea to .gitignore

* Rebased on missytake/main
- multi-processing
- file safety
- no tmp cache anymore
- cache is a visible file.
- intellij .idea to .gitignore

* changed uploaded_at to string again

---------

Co-authored-by: Thomas Aglassinger <[email protected]>
Co-authored-by: yakovlevtx <[email protected]>
Co-authored-by: Robert Xu <[email protected]>
Co-authored-by: Larry Hastings <[email protected]>
Co-authored-by: Valtteri-Jokinen <[email protected]>
Co-authored-by: missytake <[email protected]>
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

Successfully merging a pull request may close this issue.

1 participant