ajslater / codex

Codex is a web based comic archive browser and reader
GNU General Public License v3.0
186 stars 6 forks source link

OPDS "Series View" Pagination Bug #260

Closed beville closed 1 year ago

beville commented 1 year ago

I'm still seeing the same problem with the OPDS Series View pagination. Basically, if there are more than 100 series, the clients will grab the next page and then it's the publisher view (sometimes in the same list). I see this with Panels and PocketBook apps on iOS and Foliate on Linux.

So, @ajslater , you had mentioned in Discord that you created a library generator, and that seemed like an interesting idea. I looked briefly at the repo here but failed to notice it ("mock_comics") so I ended up writing my own version. Ah, well it was kind of fun, and I took a different approach. For sure it helped me recreate some issues with simpler scenarios. New repo for the tool here: https://github.com/beville/gen-fake-comics-lib

So using this new tool, I created a small library of 125 books (5 publishers, and 25 series per publisher, each series with only 1 issue).

 gen-fake-comics-lib.py  -p 5 -s 25 -v 1 -i 1 -d .

With this library, it's super clear from the listings which items in the list are series ("Series P003S022") and which are publishers ("Publisher001"). The series items always stop with the 100th: "Series P0004S025"

I would only see the first 100 series be listed, but not the last 25, and there seems no way to get them in this listing. In this case the "missing" series names should all start with "Series P005*"


Screenshots


pocketbook_series_view Bottom of PocketBook Series View List with Publisher items


panels_series_view Bottom of Panels Series View List Publisher items


foliate_2_end_of_series_list_with_next_button Foliate part1: Bottom of Series View (and what seems like the first of multiple pages)


folaite_2_after_next_button_back_to_pulishers_list Foliate part 2: after clicking the right arrow: Whoops, back to Publisher View!

beville commented 1 year ago

With my full library again, I was peeking at the feed XML in a browser and for the series view (/opds/v1.2/r/0/1?topGroup=s), it has this bit near the top: <link rel="next" href="/opds/v1.2/r/0/2" type="application/atom+xml;profile=opds-catalog;kind=navigation"/> When I manually put that href in my browser, it brings me back to the "All Publishers" page.

I wonder if the link shouldn't be <link rel="next" href="/opds/v1.2/r/0/2?topGroup=s" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>

If I manually do that one, I get a page with 100 series entries, which alphabetically follow the ones in the first page. That page has "next" and "prev" links that might need to be similarly modified with the "topGroup" query string.

ajslater commented 1 year ago

Fixed in v1.2.8