Skip to content

Commit

Permalink
[steamgriddb] disable 'adjust-extensions' for fake-png files (#5274)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Nov 20, 2024
1 parent 74a8587 commit ededba8
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions gallery_dl/extractor/steamgriddb.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ def items(self):
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):
Expand Down

0 comments on commit ededba8

Please sign in to comment.