Add support for resuming partial downloads
I noticed that gogcli currently starts the download from scratch if I interrupt it, it would be nice if there was an option to resume partially downloaded files.
I tested this using the gog-api download-url-path command.
Perhaps an additional command to verify the checksum of an already downloaded file would be nice to have too! :grin:
There is the following command though it lacks the granularity you are seeking here for verification:
gogcli storage validate
Note that complementary to the above command, the following command will generate actions in your storage which you can resume to fix any divergence between your manifest and your stored files (including checkum values):
gogcli storage repair
Otherwise, for resuming downloads, its complicated right now. GOG provides endpoints for partial downloads, though for at least one game, I noticed it was broken (the xml data the api returns to parse the partial downloads metadata is literally malformed). Maybe its better on newer api endpoints though.
Also, I don't think I'd want to get into managing the logistics where some games are downloaded via partial file downloads and others are downloaded via complete file downloads (because the checksums are computed differently, you can't just mix them, you'd have to keep an account of how each file was downloaded).
Anyways, I won't say never, but realistically, partial downloads may take some time to support. Thankfully, for Windows installers at least, the installers are already broken down across several files by GOG and they tend not to have a Linux version for the biggest AAA games.
More fine-grained downloaded files validation would be more feasible to implement in the not so distant future though.
Thanks for the info on validation.
Otherwise, for resuming downloads, its complicated right now. GOG provides endpoints for partial downloads, though for at least one game, I noticed it was broken (the xml data the api returns to parse the partial downloads metadata is literally malformed). Maybe its better on newer api endpoints though.
If I am understanding correctly, there are two API endpoints for downloading game files? I am assuming the "newer" endpoint is what GOG Galaxy uses, as it can pause and resume downloads. Hope support for this comes one day :smile:
If I am understanding correctly, there are two API endpoints for downloading game files? I am assuming the "newer" endpoint is what GOG Galaxy uses, as it can pause and resume downloads. Hope support for this comes one day smile
I believe that it may actually be a legacy feature that the now deprecated GOG Downloaded used.