Skip to content

Commit

Permalink
[pixiv][danbooru] set '_ugoira_original' for ugoira results
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 11, 2024
1 parent 5dd1791 commit f8bb0fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions gallery_dl/extractor/danbooru.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def items(self):

if post["extension"] == "zip":
if self.ugoira:
post["_ugoira_original"] = False
post["_ugoira_frame_data"] = post["frames"] = \
self._ugoira_frames(post)
post["_http_adjust_extension"] = False
Expand Down
2 changes: 2 additions & 0 deletions gallery_dl/extractor/pixiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def _extract_ugoira(self, work):
work["_http_adjust_extension"] = False

if self.load_ugoira == "original":
work["_ugoira_original"] = True
base, sep, _ = url.rpartition("_ugoira")
base = base.replace("/img-zip-ugoira/", "/img-original/", 1) + sep

Expand All @@ -173,6 +174,7 @@ def _extract_ugoira(self, work):
for num in range(len(frames))
]
else:
work["_ugoira_original"] = False
url = url.replace("_ugoira600x600", "_ugoira1920x1080", 1)
return ({"url": url},)

Expand Down

0 comments on commit f8bb0fd

Please sign in to comment.