Skip to content

Bugfix: fix some issues with kobo sync#3352

Open
xdgc wants to merge 1 commit intojaneczku:masterfrom
xdgc:kobo-sync-fix
Open

Bugfix: fix some issues with kobo sync#3352
xdgc wants to merge 1 commit intojaneczku:masterfrom
xdgc:kobo-sync-fix

Conversation

@xdgc
Copy link
Copy Markdown
Contributor

@xdgc xdgc commented Apr 3, 2025

Kobo sync's logic is incorrect, and looks like it pretty much always has been. This is seen on initial sync of a freshly reset device against c-w configured to sync all shelves. I have 1500+ books to sync, but c-w syncs only about 250 or so before saying it's done. That's two full batches of 100, followed by a partial batch.

The problem is in the way the query performs paging. On the first pass it discovers all the books that need to be synced. On the second pass it does pretty well. Third pass, it does badly. All this is because of the way it currently detects which books have been modified since last sync. As it goes through the sync, this query result set gets progressively smaller, incorrectly.

I've tried to repair the logic, and what I get now works perfectly for my case. I'm not 100% sure it's exactly right but it's doing a lot better now for both initial sync and maintenance sync.

I had trouble understanding what was going on in kobo.py initially, so I also updated some of the logging to help out. This should be seen as a net improvement, though not strictly necessary.

Kobo sync's logic is incorrect, and looks like it pretty much always has
been. This is seen on initial sync of a freshly reset device against c-w
configured to sync all shelves. I have 1500+ books to sync, but c-w syncs
only about 250 or so before saying it's done. That's two full batches of 100,
followed by a partial batch.

The problem is in the way the query performs paging. On the first pass
it discovers all the books that need to be synced. On the second pass it
does pretty well.  Third pass, it does badly. All this is because of the
way it currently detects which books have been modified since last sync.
As it goes through the sync, this query result set gets progressively
smaller, incorrectly.

I've tried to repair the logic, and what I get now works perfectly for
my case. I'm not 100% sure it's exactly right but it's doing a lot
better now for both initial sync and maintenance sync.
@xdgc
Copy link
Copy Markdown
Contributor Author

xdgc commented Jul 5, 2025

@OzzieIsaacs bump, this is a bug fix for basic functionality of the kobo OTA sync

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.

1 participant