calibre-web
calibre-web copied to clipboard
Kobo: restore archived book
More of a question.
After archiving a book, how can I get it back on my device?
I have removed it from archive in cw. But the next sync does not restore it.
I've found a solution for the interim.
If you change the date in calibre for a given book it will sync again. Just the date column, not published.
I fixed (and introduced) a lot of bugs related to kobo sync. In my experiments it now worked. Please check again
I can't get removed books from my kobo to resync regardless. Changing the date or unarchiving makes no difference.
The only way I can get a book to appear again is to edit the kobo DB to add back my user ID in the content table. This then allows me to reach out to the server and download again.
So the best way I can come up with to add a book back, is to remove the DB entry from the app.db (kobo synced table) manually. Obviously not ideal, but the quickest way to fix sync issues I've found.
Which version are you using?
Which version are you using?
The latest stable build, though I have just switched over to the nightly to fix the epub reader pic issue. Planning on staying on nightly but can't test the kobo sync until adding books to a shelf is fixed... So I will standby on that issue first.
Is it possible that the issue comes from the archived_book table in app.db not updating? I found that after archiving a book on my kobo, syncing, then unarchiving that book in calibre-web that it couldn't be resynced to my kobo.
The archived books section of calibre-web was empty but the archived_books table was still filled with the book ids.
For anyone else stumbling upon this issue, here is a way that you can force the book to re-sync. It is not perfect and hopefully this bug will be remedied. In this case I accidentally deleted and archived a book from my kobo, and was then unable to re-sync it. The steps I followed to get it to re-sync are:
- Stop calibre-web
- Find the
metadata.db
file (in your calibre library that you configured when you initially started the application) and open it withsqlite3 metadata.db
- Run the command
select * from books;
and look for your book. The first number (before the first|
on the line) is your Book ID. Keep track of this. - Log out of the database with Ctrl+D
- Find the
app.db
file (in the.calibre-web
directory. This is either in the CWD of your process or the homedir of the user running the process) and runsqlite3 app.db
-
delete from archived_book where book_id = X;
where X is the ID of your book that you got from step 3. - Figure out what the shelf ID of your shelf is by running
select * from shelf;
and looking for the name. The ID is the first number again. - Add your book back to your shelf by running
INSERT INTO book_shelf_link (book_id, shelf, date_added) VALUES ('X', 'Y', CURRENT_TIMESTAMP);
where X is your Book ID and Y is your Shelf ID. - Log out with Ctrl+D
- Start calibre-web
- Back on your Kobo, re-sync. The book should now appear on your device and in your collection again.
I hope that this helps someone. I tried to replicate effectively the same steps in the web interface, but I was not met with success.
Just experienced this issue yesterday. Had a look at the access log and sync process and it seems that the Kobo readers seemingly keep sending requests to remove archived books from its collections every time a sync is initiated. I don't think books should be removed from shelves when archived anyway, so perhaps need to find some workaround to ignore this.
edit: Maybe it's also awaiting some feedback during the sync that a book has been archived, so the reader knows it no longer needs to request the removal, but not sure how the Kobo API handles this.