Due to a recent change of exhentai.org, app failed to fetch more galleries.
More specifically, exhentai.org now use next and prev to do pagination, ditched the page parameter.
To Reproduce
Steps to reproduce the behavior:
Go to 'search'
Search any keyword that has more than one page
Scroll down to bottom
No new items
To Fix 🥳
I've done a little digging.
Fortunately, EhPanda already passed the parameter of lastID to moreSearchList URL Builder. 🥳
Note
Please note that all the changes below are to let exhentai.org work. You might want to judge whether the user is using e-hentai or exhentai.
Add a new parameter field
All we need to do is to add another parameter ( I call it nextId cuz next looks like a reserved keyword) in
Tools/Defaults.swift: Defaults.URL.Component.Keys
case fSearch = "f_search"
+ case nextId = "next"
Use that parameter
In Network/Request.swift: MoreSearchGalleriesRequest.publisher
Describe the bug
Due to a recent change of exhentai.org, app failed to fetch more galleries.
More specifically, exhentai.org now use
next
andprev
to do pagination, ditched thepage
parameter.To Reproduce
Steps to reproduce the behavior:
To Fix 🥳
I've done a little digging. Fortunately, EhPanda already passed the parameter of
lastID
tomoreSearchList
URL Builder. 🥳Add a new parameter field
All we need to do is to add another parameter ( I call it
nextId
cuznext
looks like a reserved keyword) inTools/Defaults.swift
:Defaults.URL.Component.Keys
Use that parameter
In
Network/Request.swift
:MoreSearchGalleriesRequest.publisher
Modify URL Builder
In
Tools/Utilities/URLUtil.swift
:URLUtil.moreSearchList
Modify reducer
In
View/Search/SearchStore.swift
:searchReducer
And we are good to go! 🎆