GOG-Galaxy-HTML5-exporter icon indicating copy to clipboard operation
GOG-Galaxy-HTML5-exporter copied to clipboard

Cover images not working

Open Zackyist opened this issue 2 years ago • 5 comments

Love the project, it's a perfect visualization tool for someone like me with a ton of games!

However, I'm having trouble getting any of the game cover images to work - none of them are showing in the HTML file because of bad filenames. I'm not sure if this is due to a change in the image APIs or a bug in the rename function or something else.

I cloned the latest repo, I've installed the required Python libraries, and I'm trying to use it with the following commands on elementary OS:

python3 csv_parser.py --image-list
wget -nc -P images -i ./imagelist.txt
python3 csv_parser.py --html5

I also tried --embed with the last one but it changed nothing. I got the output:

Purged 3835 unused images
HTML5 list exported

Meaning that every single one of my downloaded cover images had been deleted so I had to re-download them again. I found that the files wget downloads for me are named e.g.:

0a0adce567d4ca859e21cd9009b4251e7b2648207a67a0c0e644a4d91b5c60cb_glx_vertical_cover.webp?namespace=gamesdb
0a1a41d732c1cfe817e038e3636c1cf61f2aacababd64c0d8d7d6f4b5f24024a_glx_vertical_cover.webp?namespace=gamesdb
0a4de1578573132f7b1be302f9d91b3cf76abdc7c9e38f6546655b4c17585a13_glx_vertical_cover.webp?namespace=gamesdb

The filenames stay the same after running the script if I comment out the deletion line so the script is not renaming them properly, i.e. removing the ?namespace=gamesdb part from the end. I manually renamed a few and the images immediately showed up in the HTML file.

Zackyist avatar Apr 07 '22 17:04 Zackyist

I'm experiencing the same behavior. All downloaded images in .\images are deleted when running csv_parser --html5

bassclarinetl2 avatar Sep 08 '22 16:09 bassclarinetl2

you'd need to rename the images to get rid of ?namespace=gamesdb before running the html5-export.

i.e. perl-rename 's/\?namespace=gamesdb//' images/* on linux machines

mplx avatar Sep 14 '22 15:09 mplx

Well, it's clear that my fix for these issues clearly isn't working anymore, I'll have to update the CSV exporter and check again where the problem seems to be.

Varstahl avatar Sep 14 '22 17:09 Varstahl

Something worth noting (may not be entirely related, I'm just getting back to looking at this project) is that these images are already cached locally with the exact same filename (minus the query params). Mine are currently stored at "C:\ProgramData\GOG.com\Galaxy\webcache{I think this is a GOG user ID}{platform}".

Perhaps it is worth enumerating all of the webp files in the webcache and doing a lookup for the URL filenames and copying them from the webcache to avoid redundant downloads, and perhaps even consider symlinking to the originals instead? Might be overkill, but just wanted to bring this to your attention.

EffortlessFury avatar Oct 29 '22 13:10 EffortlessFury

I opened a PR aiming to fix that issue. #6

0rdnave avatar Feb 24 '24 08:02 0rdnave