Genericjohndoe: Silly me has a new question (An i am not sure if i did not ask the same some weeks or months ago)
I want additionally to the stuff we can download the neat little picture ( Like
https://images-2.gog-statics.com/12a2180e6c2c61a6cd2d8de68e3d58a15ac2658fede204a5aa13091cba0e770e.jpg for ABZU) downloaded and added to the game folder for a later offline-html-index-library-thingy... I see that there are the links already in the dat, has anyone a code (chatgpt is still to stupid or i ask the wrong questions) which could solve this or could you, blessed Kalanyr, add an option to your script?
Want to run a potential implementation by you since you proposed this:
Current constraints are: I need to preserve the URL name (which serves as a quick check for if GOG has changed the image), raw .jpg is a valid extra type, so I can't exempt jpgs in general from being deleted by the cleanup process.
Current idea is to create an !images folder, which is exempted from cleanup and contains 2 folders image_url and bg_url , and inside those is a folder structure mirroring GOG so eg a folder called images-3.gog-statics.com with a file in it called eg f9c802e33d6e51cf39061a1d44240be35320eaea564f49b1871ee80cbd313c46 (probably a jpg but I'll extract the file type from the MIME header if that info is available). Each time a download is done these are treated like !info.text and a quick check is done that a matching file exists and if it doesn't the current structure is nuked and replaced with the new version.
Does that work for you ?
ETA - Seems like they are always JPGs because the returned URL for the images is actually invalid and requires .jpg to be appended to be valid. A+ work GOG.
ETA2 - I've implemented this and it works so far in local testing. Going to have to make it optional though, since it's a massive drag on download speed the first time it's run clean and some people won't want these. Still happy to change things based on feedback, the harder bit was the structure for the pulling out the data and setting up how to save it and that's done now so location / filename changes are easier.
ETA3 - I clearly need to not trust GOG as well *heh*, Bioshock (which has been replaced with the Remastered version) still has a bg_url set but the file no longer exists. But that's what local testing is for.