Nandaka / DanbooruDownloader

*booru image downloader
http://nandaka.devnull.zone/
390 stars 38 forks source link

Can't blacklist tag combinations #231

Open winterstorm02 opened 3 years ago

winterstorm02 commented 3 years ago

How do I blacklist tag combinations? Anytime I try, it only seems to register the first tag and nothing after the first space. For example, "tentacles" will block the "tentacles" tag entirely, but "tentacles -rating:safe" (I would think) should block the "tentacles" tag only if the image is also tagged anything but safe, but the downloader seems to ignore anything after the first space. Am I doing something wrong here? I'm trying to download from danbooru, if it helps.

Nandaka commented 3 years ago

put a new line for each tags.

winterstorm02 commented 3 years ago

See that's the problem I'm having. That's exactly how I'm setting it up and it's completely disregarding the rest of the tags on each line after the first space on that line.

tag1 tag2 tag3 tag4 -tag5

In this setup, tag1 is blocked as usual. tag2 should only be blocked if tag3 is also present, but is blocked entirely, and tag4 should be blocked if tag5 is not present, but again, is blocked entirely.

winterstorm02 commented 3 years ago

Here's the problem I'm having. In the top example, the blacklist is functioning as intended. In the center example, however, the third picture down shouldn't be blocked, because the tag necessary to accompany it for it to qualify as blacklisted is not present, and in the bottom example, no pictures should be blocked, as the absence of the second tag would qualify it as blacklisted, and the search parameters has removed that possibility. trouble

Nandaka commented 3 years ago

it doesn't work that way in the application. It doesn't follow danbooru tag blacklist rule, you need to write a regular expression if you want to exclude tag combination.

https://github.com/Nandaka/DanbooruDownloader/blob/master/DanbooruDownloader3/Helper.cs#L476

“Blacklisted tags” => Tags to be blacklisted in the Main Tab/Batch Job. 
                      It will shown with grey background in Main Tab.
                      It will be skipped in Batch Job.
                      Separate each tag with new line.
winterstorm02 commented 3 years ago

How do I write a regular expression then?

Nandaka commented 3 years ago

hhm google it? otherwise you can include the tags in the search query