Set sync request to re-download books when the book file has changed#3394
Open
AsherMaximum wants to merge 16 commits intojaneczku:Developfrom
Open
Set sync request to re-download books when the book file has changed#3394AsherMaximum wants to merge 16 commits intojaneczku:Developfrom
AsherMaximum wants to merge 16 commits intojaneczku:Developfrom
Conversation
# Conflicts: # cps/kobo.py
# Conflicts: # cps/kobo.py
…t sync # Conflicts: # cps/kobo.py
…itlement Updating revision ID to let Kobo device know metadata has changed Revert "Updating revision ID to let Kobo device know metadata has changed" This reverts commit ec3367a.
This way when ChangedProductMetadata is sent, the coverImageId will be updated, and will trigger a redownload of the cover Moving thumbnail generatedAt fetch to query in metadata function
…nitlement with Preview Accesibility Checking book file modified date against sync_token to send ChangedEntitlement
This was referenced May 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a continuation of PR #3381, and is dependent on changes from it, but I branched it off from my branch for that PR, separating it out since the functionality is for a pretty narrow use case, and the maintainers may not want to include this part.
This is for issue #3133.
When a sync is run, for any books that have any of the
KOBO_FORMATbooks with afile last modifieddate greater than the last sync, the sync request first sends aChangedEntitlemetwithAccessibilityset toPreview. This causes the book download to be removed, but that isn't the purpose of it. The purpose is to make it so that with the next sync, whenAccessibilityis set toFulllike normal, the Kobo sees it as a change, which causes a re-download.So, after the
ChangedEntitlementis sent, the book is removed from thekobo_synced_bookstable, andcont_syncis set to true, so that when Kobo process the request, it does another request to the sync page.On that second call, since the book file is no longer modified after the last sync date, and the book is not in the
kobo_synced_bookstable, it is sent as aNewEntitlement, which will trigger an automatic download of it - for the first 5 new books from a sync request as usual.