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:
parent
15a4d7696f
commit
b2b0b1c455
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user