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

Conditional filenaming not working for artist tags #2769

Closed
Roshri opened this issue Jul 29, 2022 · 4 comments
Closed

Conditional filenaming not working for artist tags #2769

Roshri opened this issue Jul 29, 2022 · 4 comments
Assignees
Milestone

Comments

@Roshri
Copy link

Roshri commented Jul 29, 2022

Bug description

Some artists go by multiple pen-names so I like to group them all in a single folder by a name I recognize the most.
So I set up some conditional filenaming rules and some time ago it stopped working as intended

Steps to reproduce

  1. Add a new conditional filename with an artist tag as the condition, and use it as the folder name
  2. Search for any picture by that artist and download it
  3. Clicking on "Open" will open a folder name with the condition that was supposed to be changed
  4. Tried with danbooru and gelbooru sources

image

image

Tried to make it work both of these ways and it still gets downloaded to a "kuppipi ramutarou" folder

Expected behavior

The folder should be named as detailed in the conditional filename prompt

  • OS: Windows 10
  • Grabber version: 7.9.1

EDIT: Found something that could be helpful. The problem appeared on precure images, which have another conditional filename set, like this

image

So I guess there's a conflict between the rules, is there a way to set priority?

EDIT 2: Tried moving the precure condition to the last place of the list and now it works as intended. Having the option to move the conditions with a button (to send them to the bottom, for example) would be great for these kind of situations where a new condition conflicts with a previous one. I guess this now became a feature request? Sorry for the trouble

@Roshri Roshri added the bug label Jul 29, 2022
@Bionus Bionus added suggestion and removed bug labels Jul 30, 2022
@Bionus Bionus self-assigned this Jul 30, 2022
@Bionus
Copy link
Owner

Bionus commented Jul 30, 2022

In your case, I believe the main issue was actually that filenames were not all being evaluated. Since in one you're overriding the filename, and in another the folder, they should both be taken into account. I pushed a fix so that it works fine.

Now, filenames will work just like folder: use the last matching filename (so conditionals at the bottom have "priority" over ones at the top). This was actually already the case for folders, but for filenames we were stopping at the first one.

@Bionus Bionus added this to the 7.9.2 milestone Jul 30, 2022
@flaccidbagel
Copy link

flaccidbagel commented Dec 9, 2022

I've begun to notice some interesting behavior with this as well. For example trying to create a condition for a user tagged "Wet_Cheetos" with an output folder of "Wet Cheetos (FullCounter)" results in two separate scenarios.

If the condition is simply "Wet_Cheetos", the resulting save folder is just Wet Cheetos. If I use the condition/tag of "user:Wet_Cheetos" to only focus on their uploads, the folder is then named "user Wet Cheetos". I'm not sure what it is, but it seems there's something about the tag that's causing it to simply skip over the folder assignment portion.

So far, no permutation of quotations or parentheses in the name has fixed the issue for me. Yet I can do the same with other artists just fine, though I've noticed the others I'm trying this with don't use an underscore in their tags or usernames.

@Bionus
Copy link
Owner

Bionus commented Dec 11, 2022

@flaccidbagel so if I understand correctly, you have something like this:
image

I'm not sure the conditionals support the meta:value syntax 🤔

@flaccidbagel
Copy link

That pretty much sums it up, though the user:Wet_Cheetos tag also points to the same folder path, "D:\out\Wet Cheetos (FullCounter)". I tried each one separately to see if I could get them to point to the preferred folder. I figured if the meta:value syntax doesn't work, I could work around it by just searching for the tag itself, but then there's the strange behavior with the top entry, as it still seems to ignore the folder path, stopping at "D:\out\Wet Cheetos" rather than using "D:\out\Wet Cheetos (FullCounter)".

@Bionus Bionus closed this as completed in 210873d Dec 16, 2022
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