OPDS feeds should be sorted by insertion date descending
Bug Report Template for Booklore
What happened?
When a shelf is set up to sync automatically over OPDS in KOReader, new additions/a normal sync doesn't work beyond the first one. A force sync is required to actually download new entries.
How can we see it happen?
Steps to reproduce the issue:
- Create a shelf with more books than the OPDS page size (not sure if that bit actually matters)
- Set up KOReader to sync the shelf automatically over OPDS
- Add a book to the shelf
- Sync in KOReader - no update is detected and no new book is downloaded
What did you expect to happen?
The new book(s) should be downloaded
Screenshots or Error Messages
n/a
About your setup:
- Booklore version (e.g., v1.9.0)
- What computer or device are you using? n/a
- Which browser and version? n/a
- How did you install Booklore? Docker
Anything else we should know?
From what I can tell, this stems from the fact that the OPDS feed for a shelf is sorted by insertion in the shelf ascending - first books added to the shelf are returned first in the OPDS feed. This is against what an Atom syndication format should be, and what clients (not uniquely KOReader) expect - new books should be added at the front.
What I suspect is happening is that KOReader fetches the first page, assumes the first entry is the most recent, it's not newer than the last sync so nothing happens. It's kind of validated by the fact that a force sync, which forces KOReader to read the whole feed and download every book over again, does work. This has multiple downsides though:
- Obviously, a lot higher bandwidth usage and higher latency, as not only the whole feed has to be fetched and parsed, but every single book has to be downloaded over again
- On a PocketBook at the very least, as the files are rewritten, all the books in the shelf are marked as new as of today
- My understanding is that KOReader should regularly fetch new books from the OPDS catalog automatically in the background if syncing is enabled - this obviously doesn't work at all.
I am having the same issue when trying to sync a Booklore shelf through OPDS on Koreader. The sync feature in Koreader is relatively new. Here is the PR where it was added, for reference. https://github.com/koreader/koreader/pull/13946#issue-3143472310
As Volterxien mentions in that PR, it expects new entries to be added to the front of the list. When they are not, it will assume everything is up to date. Using the force sync option does work, however it has several downsides that @Kernald described, above.
I did try to use the override option in the Booklore UI for the shelf that I'm trying to sync with Koreader through OPDS. However, that did not have any effect on the sort order.
While Booklore does offer a recently added option through OPDS, this shows recently added for all books. I would really love to be able to use a shelf for this functionality. This would allow for a similar workflow to the "Kobo Sync" feature that Booklore offers.
+1 a fix to this would be great.