humblebundle-downloader icon indicating copy to clipboard operation
humblebundle-downloader copied to clipboard

Suppress "No url found" warning for 0 byte entries

Open larryhastings opened this issue 3 years ago • 1 comments

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".

(Also, I added .gitignore entries for build/ and dist/, which are automatically created by "python3 setup.py".)

larryhastings avatar Jan 18 '22 04:01 larryhastings

Also see https://github.com/xtream1101/humblebundle-downloader/issues/49 for context about the user experience.

larryhastings avatar Jan 19 '22 06:01 larryhastings