Updated metadata, covers, and deleted books added to Kobo Sync#3381
Updated metadata, covers, and deleted books added to Kobo Sync#3381AsherMaximum wants to merge 15 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
30683fe to
33bea08
Compare
Getting this when running this PR on an existing database. Is there a database migration step that needs to be done? Edit to add: I ran calibredb restore_database, which did resolve the error above but results in errors when the device tries to download the books (because of custom column tables now missing), so that in itself doesn't appear to be enough. |
|
I need to look at the logic for when only kobo shelves is not turned on; I think that's what's happening here. It's checking for books that have been deleted from a shelf, but without onlykobo sync shelves turned on, that field doesn't exist. There's no database changes for this, so not sure why you're getting an error related to that. |
|
These are very useful additions! Hope this get merged in the main branch. |
The latest commit should fix this error - it wasn't an added field to the database. The query for when onlyKobo shelves is on adds a field to the results to indicate if the book is one that has been removed from a shelf, so that it can be deleted from the device. |
|
oops, that was not the right button to submit a comment, lol |
|
Looks to be working now, it grabs the updated cover on sync. Actually getting the cover to show on the device is a little spotty (it shows the blank placeholder a lot of the time, but randomly the right cover just pops up sometimes), but that's probably not on calibre-web's side |
|
i tried this pull request on my instance. My goal was, that when I disable the Kobo sync a shelf that has been synced to my Kobo before, I want the books and collections on my Kobo Reader to be deleted. But it didn't work out, think I misunderstood the purpose of this PR? :smiling Best regards, |
|
Deleting the books is the intention - not the collection though, haven't figured out how to do that yet. If the books are in multiple collections though, and you only disable kobo sync on one of them, the books would not get deleted. |
Yeah, I've had that issue too. It seems the kobo does not always cache the cover, and I haven't yet figured out why. |
For #3298, #2685, #2816, #2509, #3133
Adds functionality to Kobo Sync for removing books from a shelf, updating metadata, and updating covers.
Sends a
BookEntitlementdeletion for any books that have already been synced to the kobo but are now no longer on a sync shelf (when sync only kobo marked shelves is turned on)Also sends a
ChangedProductMetadatafor any books that has a modification date after the last sync, so the Kobo will get the new metadataAdded a version to the CoverImageId based on the cover file modified date. Also added an automatic thumbnail refresh to Kobo sync initialization.