ManuelReschke/go-pd

Failed to download some files.

Closed this issue · 5 comments

For some reason download is failed with the Linux package in Debian 9.
Downloaded fine with Linux package in WSL, and with Windows package in Win11.
Other smaller items successfully downloaded.

error displayed:
Error: json: cannot unmarshal number 3436873471 into Go struct field ResponseFileInfo.bandwidth_used of type int

https://pixeldrain.com/l/MN5CyAyT#item=1 >> https://pixeldrain.com/u/Wpggfbtp
https://pixeldrain.com/l/MN5CyAyT#item=3 >> https://pixeldrain.com/u/8r2cfLKM

I think you're running a 32 bit executable. 32 bit ints can only hold file sizes up to 2 GiB. Try installing a 64 bit release.

Ideally all ints from the API should be saved as int64.

I will change all to int64 and push a fix soon as possible.

@pikach0o can you confirm that it work?

@pikach0o can you confirm that it work?

Sorry for the late reply.
I confirm that version 1.4.1 linux_386 works in my vps, with those two files.

Thank you for the fix.