codewario / PocketLibraryImages

This tool will prepare an image library for use with cartridges (and openFPGA cores if Analogue ever supports them) on Analogue OS
MIT License
110 stars 1 forks source link

Provide workaround when Invoke-WebRequest can't complete the download due to Github closing the server connection #7

Closed codewario closed 1 year ago

codewario commented 1 year ago

For larger archives (at this time, this really only affects the GBA image archive as for what the Pocket supports), the download can fail as Github may reset the connection if the download takes too long. I have not been able to reproduce this at the browser level (tested with msedge).

Provide a workaround when this case is hit to provide a local file path to an image archive. I'm not sure whether download resuming is possible as code archive downloads do not advertise the size of the file.

A long term-solution may be to try using a well-known browser user-agent in case Github treats browsers differently, or see if the behavior persists when using WebClient to download the file, but for now a path-based workaround should suffice.

codewario commented 1 year ago

I've been able to reproduce this at the browser level now. Still, having this option will be a potential bandwidth saver if you already have an image archive downloaded.

codewario commented 1 year ago

Script now supports providing a local path to the image archive, and instructions have been provided to create the export from a git clone if the repo archive cannot be obtained any other way.