Skip to content

Commit

Permalink
[pixiv] preserve 'tags' order (#3266)
Browse files Browse the repository at this point in the history
for '"tags": "translated"'

As it turns out, set() does *not* preserve insertion order.
  • Loading branch information
mikf committed Nov 22, 2022
1 parent 1392b44 commit 5a17e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gallery_dl/extractor/pixiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def items(self):
transform_tags = None
elif tags == "translated":
def transform_tags(work):
work["tags"] = list(set(
work["tags"] = list(dict.fromkeys(
tag["translated_name"] or tag["name"]
for tag in work["tags"]))
else:
Expand Down

0 comments on commit 5a17e15

Please sign in to comment.