Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pixiv] Translated tags #1354

Closed
TestPolygon opened this issue Mar 4, 2021 · 2 comments
Closed

[pixiv] Translated tags #1354

TestPolygon opened this issue Mar 4, 2021 · 2 comments

Comments

@TestPolygon
Copy link

The same request as here
#1299 (comment)

@mikf mikf closed this as completed in 7440d1f Mar 5, 2021
@TestPolygon
Copy link
Author

What is about removing duplicates?
When there are a translated tag and the same non-translated one.

For examle: https://www.pixiv.net/en/artworks/88605193
For it I get : ["walfas", "walfas tool", "MGSV", "Quiet", "MGS", "MetalGear", "MetalGearSolid", "Quiet", "metal gear solid", "Metal Gear"].

Here "Quiet" is counted twice.
I don't think that it makes sense to store duplicate tags.

@rautamiekka
Copy link
Contributor

rautamiekka commented Apr 12, 2021

Indeed, given

            work["tags"] = [tag[tkey] or tag["name"] for tag in work["tags"]]

does the work, it can be extended to

            work["tags"] = [tag[tkey] or tag["name"] for tag in work["tags"] if tag not in work["tags"]]

, I think.

EDIT: Hmm, thinking about it further, might not work ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants