1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-24 03:32:33 +01:00

[steamgriddb] disable 'adjust-extensions' for fake-png files (#5274)

This commit is contained in:
Mike Fährmann 2024-11-20 19:19:23 +01:00
parent 74a8587798
commit ededba8087
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -56,14 +56,19 @@ class SteamgriddbExtractor(Extractor):
download_fake_png = self.config("download-fake-png", True)
for asset in self.assets():
if download_fake_png and asset.get("fake_png"):
urls = (asset["url"], asset["fake_png"])
else:
urls = (asset["url"],)
fake_png = download_fake_png and asset.get("fake_png")
asset["count"] = len(urls)
asset["count"] = 2 if fake_png else 1
yield Message.Directory, asset
for asset["num"], url in enumerate(urls, 1):
asset["num"] = 1
url = asset["url"]
yield Message.Url, url, text.nameext_from_url(url, asset)
if fake_png:
asset["num"] = 2
asset["_http_adjust_extension"] = False
url = fake_png
yield Message.Url, url, text.nameext_from_url(url, asset)
def _call(self, endpoint, **kwargs):