Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SteamGridDB] Using "download-fake-png" downloads two .webp files #5274

Closed
MemeMan404 opened this issue Mar 3, 2024 · 5 comments
Closed
Labels

Comments

@MemeMan404
Copy link

By default, the "download-fake-png" config is "true" for SteamGridDB. It is supposed to download a "fake PNG" version of an animated file alongside the original file (the website provides both). However, when downloading, it instead just downloads two of the same .webp, ending in "_01.webp" and _02.webp" instead of one file having the .webp extension and the other the .png extension.

Example of an animated asset providing the original .webp format and the "fake png" format: https://www.steamgriddb.com/grid/374270

@mikf
Copy link
Owner

mikf commented Mar 3, 2024

The png extension of the fakepng file gets updated to webp by the adjust-extensions option because it actually is a webp and not a png file.

$ file 78c9da25585688cd7bd6e73e40806015-fakepng.png 
78c9da25585688cd7bd6e73e40806015-fakepng.png: RIFF (little-endian) data, Web/P image

Both files, webp and fakepng, are the same, it seems.

@MemeMan404 MemeMan404 reopened this Mar 3, 2024
@MemeMan404
Copy link
Author

My apologies, but is there any way to disable adjust-extensions for only a specific extractor in the configuration file, instead of having to type -o adjust-extensions=false into the terminal or setting it to false globally?

@mikf
Copy link
Owner

mikf commented Mar 3, 2024

It can only be enabled/disabled globally at the moment, like all other downloader options.


May I ask what the point of these fake png files is?
Is it just a way to essentially download a webp file renamed to png?

@mikf
Copy link
Owner

mikf commented Mar 3, 2024

Since those fake PNGs are always the second file, you could use the following to overwrite the extension value to always use .png:

"filename": {
    "num == 2": "{game[id]}_{id}_{num:>02}.png",
    ""        : "{game[id]}_{id}_{num:>02}.{extension}"
}

@MemeMan404
Copy link
Author

It can only be enabled/disabled globally at the moment, like all other downloader options.

May I ask what the point of these fake png files is? Is it just a way to essentially download a webp file renamed to png?

Simply put, the purpose of the fake PNG is so that Steam recognizes it, as Steam only supports .pngs for custom banners or grids. The fake png allows you to trick steam and have animated assets.

The code you provided seems to have worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants