hydrusnetwork / hydrus

A personal booru-style media tagger that can import files and tags from your hard drive and popular websites. Content can be shared with other users via user-run servers.
http://hydrusnetwork.github.io/hydrus/
Other
2.4k stars 158 forks source link

Duplicate processing tags: conditionals #797

Open roachcord3 opened 3 years ago

roachcord3 commented 3 years ago

Since posting this, I've come up with new use cases. The newer one, which should be relevant to more users, comes first.

Use case 1: only copy title: tag if better duplicate doesn't have one

I follow some artists who use both pixiv and a paid site. They tend to post some lower-res versions of their works on pixiv with a link to the high-res versions on their paysite. I consider the post titles for each individual post to be identifiers of that post, so I don't want to copy the title: tag over.

There are also the cases of artists reposting past work on the same site, but in better quality. This is another time when I don't want to copy the title: tag.

However, there are times when I have a better quality duplicate from another source that doesn't have titles, such as a private discord server acting as a paysite. In this case, copying the title: over usually makes sense, since there isn't the same "post page" concept going on.

To solve this, I would like a rule that says "copy title: tags from worse to better, unless the better quality image already has any title: tag."

Use case 2: only copy todo: tag if better duplicate also meets the criteria

I use a tag on the my tags service to indicate a backlog of files where I want to do some future work with them: clean them up/decensor in GIMP, search for/purchase a higher resolution version, stuff like that. In some cases, when processing dupes, I want to still copy/move these tags because a new dupe, even if it is higher quality, has not satisfied the workflow yet.

Example of when I want to keep a tag: there's a file I plan to decensor later when I have the time. I find a higher resolution version of it online but the higher res is still censored. I want to preserve my tag that tells me to decensor the image later.

Counter example of when I want to remove that same tag: I get around to decensoring the file and I use dupe processing to replace it. In this case I don't want to copy the tag.

To solve this, I would like a rule that says "if the better quality image has the meta:censored tag on any service, copy the todo:decensor tag from worse to better."

This may be partially addressed by #754 but having to create new custom actions for every conditional branch would be very tedious, and it would be easy to get the rules out of sync if e.g. I want to add a new tag to the blacklist in general.

roachcord3 commented 4 months ago

Now that I think about it, if #677 is implemented and can do arbitrary kinds of relationships, then I could just make a "decensor" relationship an have tag copying rules for it. So, that use case may be moot depending on whether that one gets implemented in a certain way, at least, for my personal use case.

The "title" relationship I think might be a bit different: obviously you could make a relationship like "paid version," but that's really darn similar in concept to "better quality duplicate," and it's not like the only time the desire to only copy a tag if the better quality duplicate doesn't have tags of that namespace is the "paid version" idea.