koreader / koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
http://koreader.rocks/
GNU Affero General Public License v3.0
15.76k stars 1.22k forks source link

FR: opds-ps support #9103

Closed zombiehoffa closed 1 year ago

zombiehoffa commented 2 years ago

Does your feature request involve difficulty completing a task? Please describe. I would like opds-ps support so that I can sync progress to kavita reader (among others)

Describe the solution you'd like add opds-ps support to the opds plugin

Describe alternatives you've considered na

Additional context opds-ps allows syncing of progress, which is pretty useful if your library is stored in a program that suports it like kavita reader.

majora2007 commented 2 years ago

You can find the spec for OPDS-PS here: https://anansi-project.github.io/docs/opds-pse/specs/v1.0

fritzcloud commented 1 year ago

This would be seriously great. Using Kavita it would sync reading between phone, browser and Koreader on kindle.

zombiehoffa commented 1 year ago

This would be seriously great. Using Kavita it would sync reading between phone, browser and Koreader on kindle.

I wish more people cared so this would get implemented, as I can't do it due to lack of programming skills...

mizz141 commented 1 year ago

I would really appreciate this feature being added, as it also would allow to synchronize my library between Kavita, Koreader and even Tachiyomi.

TesseractCat commented 1 year ago

I added PSE in a commit a while ago, but I believe I implemented it wrong. As this comment says: https://github.com/koreader/koreader/issues/8978#issuecomment-1091808603, I hardcoded the namespace "pse" instead of allowing for all namespaces.

I don't have time to fix it myself, but it should be a simple change to either take into account the namespace, or just ignore the namespace and look for any attribute ending in :count here https://github.com/koreader/koreader/blob/46f729c248946d9af081eeabd479db2bc3c933a5/plugins/opds.koplugin/opdsbrowser.lua#L512

bigdale123 commented 1 year ago

I'm pretty sure i've managed to fix this in this PR: https://github.com/koreader/koreader/pull/9650

It's a relatively simple method, loop through all the keys available in the OPDS Entry and find the count key using pattern matching. Then save that key for later use when we set the page count in the table, which will have the correct namespace included.

At the very least, it's a hotfix until a better solution crops up. I tested the functionality on my Kavita server, and it works.

zombiehoffa commented 1 year ago

You Sir, are a golden God.