Fix #5362: Suggest ai-generated as a translated tag from pixiv response
This commit is contained in:
@@ -104,10 +104,17 @@ module Source
|
||||
end
|
||||
|
||||
def tags
|
||||
api_illust.dig(:tags, :tags).to_a.map do |item|
|
||||
tags = api_illust.dig(:tags, :tags).to_a.map do |item|
|
||||
tag = item[:tag]
|
||||
[tag, "https://www.pixiv.net/search.php?s_mode=s_tag_full&#{{word: tag}.to_param}"]
|
||||
end
|
||||
|
||||
if api_illust["aiType"] == 2
|
||||
# XXX There's no way to search for posts with the AI flag on Pixiv. The "AI" tag is the closest equivalent.
|
||||
tags += [["AI", "https://www.pixiv.net/tags/AI/artworks"]]
|
||||
end
|
||||
|
||||
tags
|
||||
end
|
||||
|
||||
def normalize_tag(tag)
|
||||
|
||||
Reference in New Issue
Block a user