janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13.17k stars 1.41k forks source link

Books not marking as read in calibre-web when marked "Finished" on Kobo #3116

Closed an-ghinid closed 2 months ago

an-ghinid commented 3 months ago

Describe the bug/problem Marking any book finished on my kobo libra 2 (which has been setup with kobo sync and working fine for months otherwise) has stopped syncing read status back to calibre-web's internal database. I don't use the setting to map to a calibre custom column for read status or anything, pretty much just stock settings.

Note - all other sync actions work fine, I can download books, add books etc and they show up on the kobo just fine.

Marking as "read" via the calibre-web UI also works totally fine.

To Reproduce

Steps to reproduce the behavior:

  1. Download any book via kobo sync (which works as expected)
  2. Read the book or manually mark it as "finished" via the kobo UI
  3. Run a sync
  4. Sync completes but read status does not update

Logfile

Hard to find anything useful in the log, but a sync where nothing happens after marking a book as finished looks like this:

[2024-08-04 04:18:53,039] DEBUG {cps.kobo:260} Remaining books to Sync: 0
[2024-08-04 04:18:53,407] DEBUG {cps.kobo:104} Content: b'[]'
[2024-08-04 04:18:53,408] DEBUG {cps.kobo:105} StatusCode: 200

Expected behavior

Finished books would sync back to calibre-web and mark book as read.

Screenshots My settings are all pretty normal:

image image

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Checking the app.db sqlite database, I've noticed that the book_read_link table doesn't update as expected, for example if I mark a book as finished on the kobo that corresponds to id 208 in calibre-web and check the db it looks like this:

sqlite> select * from book_read_link WHERE book_id=208;
id|book_id|user_id|read_status|last_modified|last_time_started_reading|times_started_reading
189|208|1|0|2024-06-20 00:30:15.517604||0

And this happens both with and without a reverse proxy. I can also replicate it with a totally fresh install on a separate instance. Let me know if there's anything else I can do to help pin down the issue.

OzzieIsaacs commented 3 months ago

Do you have a calibre column liked to the read status, as in #3079?

an-ghinid commented 3 months ago

Nope, no column linked to read status set on my end (can see my settings in the screenshots and that field is currently default and just blank).

I do have a custom Boolean column on the calibre instance that isn't linked to calibre-web at all if that's relevant. It's just for calibre only tracking I don't reference in calibre-web though.

an-ghinid commented 2 months ago

This seemed to be due to a failing sd card (write failures were preventing database updates), since I've moved to an ssd this is now resolved.