9-FS / nhentai_archivist

downloads hentai from nhentai.net and converts to CBZ
MIT License
116 stars 7 forks source link

tags filter does not 'match whole word only ' #10

Closed Eliamaniac closed 2 months ago

Eliamaniac commented 2 months ago

tags filter does not 'match whole word only' - for example, searching the artist "mana" will download "mana-ko" and "aoi manabu", everything with mana in it. My syntax was the same as yours : NHENTAI_TAGS = ['artist:"mana"'] Making the results jump from 200 to 1460

9-FS commented 2 months ago

Hi, thank you for the issue. I could recreate the problem and am looking into it.

9-FS commented 2 months ago

I have looked into it. It seems like this is not something the nHentai search API supports. Please correct me if I'm wrong, I got my information from here. If you find out how to filter by whole words using the search API, I'm willing to include these instructions into my readme or do small patches if anything needs to be changed.

Of course there must be some way to query for the artist directly, but even if I found out how, using that would mean combination of multiple tags is not done server-side anymore, but client-side. That would cause way too much unnecessary network traffic and metadata download times would shoot up with every tag specified instead of decreasing. I'm not willing to do that.

Eliamaniac commented 2 months ago

Ok, then can't be helped. It could be added on the readme. I used Bulk Renaming Utility to filter the files, which can be useful for those who can't do python scripts. Thank you for looking into this.

9-FS commented 2 months ago

Has been added to the readme!

Yeah the only way I can think of is doing what you're doing and filter them by the tags contained in the ComicInfo.xml after it has all been downloaded. Sorry I couldn't be more of a help.