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

EHPlugin update for the new search system #707

Merged
merged 3 commits into from
Nov 10, 2022
Merged

Conversation

polak14
Copy link
Contributor

@polak14 polak14 commented Nov 2, 2022

So while i believe the text search should still work fine i went ahead and updated it anyway.

File searches can no longer be combined with keyword searches or other filters. This search mode will show both normal and expunged galleries. Default tag, language and uploader filters are now automatically disabled for these searches.

Selecting "Search Expunged Galleries" will now only search expunged galleries in normal searches. (File searches, GID searches and favorite searches will always display both normal and expunged galleries.)

Additionally from what i understand the image search works best (only works?) when using the full image hash not the thumbnail hash.
Also we can now search by gID which can be added as an option later.
Added an option for this, worked nicely and will fall back to title name if no gId found or search failed.
[2022-11-02 19:11:23] [E-Hentai] [debug] Found gID: 2365440, Using URL https://exhentai.org?f_search=gid%3A2365440 (gID from archive title) [2022-11-02 19:11:23] [E-Hentai] [debug] EH API Tokens are 2365440 / 9ff65b23c7

read more here: https://forums.e-hentai.org/index.php?showtopic=261743&pid=6201235

updated text search for the new search system (mostly just removing now deprecated flags) 
image search no longer supports searching tags
"- Selecting "Search Expunged Galleries" will now only search expunged galleries in normal searches. (File searches, GID searches and favorite searches will always display both normal and expunged galleries.)"
searching by gID extracted from the title name (when for example downloaded from H@H), will fallback to title name if no gID is found or the search fails due to a false match.
Copy link
Owner

@Difegue Difegue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work, I wasn't aware of that search change before seeing that PR!

Could you look into making sure the basic search test doesn't fail? (You can see the test run here)
Looks like it's now returning https://exhentai.org/g/2366539/83aa0d7d05 instead of https://exhentai.org/g/618395/0439fa3666/ , which seems a bit wrong.

@polak14
Copy link
Contributor Author

polak14 commented Nov 3, 2022

It fails because e-hentai doesn't have the new search system yet, need to use ex right now. (Im assuming it doesn't use ex for the tests?)

Well after a bit of testing i can conclude that the new search just sucks. (but not related to the test failing, that's just because EH is still on the old system)
https://e-hentai.org/?f_cats=1023&f_search="(Kouroumu+8)+[Handful☆Happiness!+(Fuyuki+Nanahara)]+TOUHOU+GUNMANIA+A2+(Touhou+Project)"
returns the gallery as expected but if you look it up on ex (with the new system) no results. In this case removing the "☆" works but it happens on a bunch of other galleries without any special characters too.

The GID search at least works nicely when its included in the title.
[2022-11-03 02:03:24] [E-Hentai] [debug] Found gID: 618395, Using URL https://exhentai.org?f_search=gid%3A618395 (gID from archive title)

@polak14
Copy link
Contributor Author

polak14 commented Nov 9, 2022

After a few updates it looks like its working as expected or even better again. Still waiting for EH to use the new system now.
[2022-11-09 22:22:37] [E-Hentai] [debug] Using URL https://exhentai.org?advsearch=1&f_sfu=on&f_sft=on&f_sfl=on&f_search=%22%28Kouroumu%208%29%20%5BHandful%E2%98%86Happiness%21%20%28Fuyuki%20Nanahara%29%5D%20TOUHOU%20GUNMANIA%20A2%20%28Touhou%20Project%29%22 (archive title) [2022-11-09 22:22:37] [E-Hentai] [debug] EH API Tokens are 618395 / 0439fa3666

@Difegue
Copy link
Owner

Difegue commented Nov 10, 2022

Alright, that looks fine -- I guess we can merge this for now, so that people who use ex can move to nightly builds if they want.

Hopefully the change moves to EH as well before I get to make a release 🙏 Thanks again!

@Difegue Difegue merged commit 2dbd103 into Difegue:dev Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants