Feat: Improve kobo reading state sync logic for better bidirectional support (#1644)

* feat: kobo sync improvements (push changes from booklore, and properly delete kobo data on reset)

* fix: issues with sync race conditions and improve readability

* fix: update function names to be clearer and more explicit

* fix: move partially_read to reading status mapping

* fix: make the bufferwindow more explicit in the unsynced progress check

* chore: add unit tests for additional sync logic

* fix: improve bi-directional logic to account for changes in progress and status

* chore: add additional tests to check the kobo sync logic and remove redundant tests
This commit is contained in:
CounterClops
2025-11-30 09:44:11 -07:00
committed by GitHub
parent 2336d04a46
commit 3ef5b60ed6
14 changed files with 1169 additions and 254 deletions
@@ -0,0 +1,11 @@
ALTER TABLE user_book_progress
ADD COLUMN IF NOT EXISTS kobo_status_sent_time TIMESTAMP;
ALTER TABLE user_book_progress
ADD COLUMN IF NOT EXISTS read_status_modified_time TIMESTAMP;
ALTER TABLE user_book_progress
ADD COLUMN IF NOT EXISTS kobo_progress_sent_time TIMESTAMP;
ALTER TABLE user_book_progress
CHANGE COLUMN kobo_last_sync_time kobo_progress_received_time TIMESTAMP;