1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

[hitomi] fall back to webp when format not available (#3030)

This commit is contained in:
Mike Fährmann 2022-10-10 15:07:54 +02:00
parent 15a4d7696f
commit b2b0b1c455
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -115,12 +115,16 @@ class HitomiGalleryExtractor(GalleryExtractor):
fmt = self.config("format") or "webp"
if fmt == "original":
subdomain, fmt, ext = "b", "images", None
subdomain, fmt, ext, check = "b", "images", None, False
else:
subdomain, ext = "a", fmt
subdomain, ext, check = "a", fmt, True
result = []
for image in self.info["files"]:
if check:
if not image.get("has" + fmt):
fmt = ext = "webp"
check = False
ihash = image["hash"]
idata = text.nameext_from_url(image["name"])
if ext: