Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 11-21-2018, 12:02 PM   #1
karl1c
Junior Member
karl1c began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2017
Device: iPad
Does CC's calibre driver support two-way syncing?

I have CC on iOS and the only fields that are editable are the _is_read_ and _last_read_date_.

1. Is there a reason CC does not support editing of other fields?

2. In principal, does the Calibre driver support syncing other fields?
I've had a look at the code for the driver at https://github.com/kovidgoyal/calibr..._app/driver.py and fiddled about with Wireshark.
It seems that CC sends all the metadata back and looks like the driver *should* sync it.
I've tried emulating CC (with changes to, say, the comments field) using netcat, but the changes don't appear in Calibre (the changes to _is_read_ *do* appear).

Thanks.

Last edited by karl1c; 11-21-2018 at 12:25 PM.
karl1c is offline   Reply With Quote
Old 11-21-2018, 03:25 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,354
Karma: 22265700
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by karl1c View Post
I have CC on iOS and the only fields that are editable are the _is_read_ and _last_read_date_.

1. Is there a reason CC does not support editing of other fields?

2. In principal, does the Calibre driver support syncing other fields?
I've had a look at the code for the driver at https://github.com/kovidgoyal/calibr..._app/driver.py and fiddled about with Wireshark.
It seems that CC sends all the metadata back and looks like the driver *should* sync it.
I've tried emulating CC (with changes to, say, the comments field) using netcat, but the changes don't appear in Calibre (the changes to _is_read_ *do* appear).

Thanks.
Thats it. Read ststus
theducks is offline   Reply With Quote
Old 11-21-2018, 04:16 PM   #3
karl1c
Junior Member
karl1c began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2017
Device: iPad
Thanks @theducks. Where in the code is the "bottle neck"? (As you'll know, the other fields are sent from CC and appear to be accepted by the driver, but don't get synced.)

I assume by "Read status", you mean the status and the date, as the date also gets through.
karl1c is offline   Reply With Quote
Old 11-21-2018, 04:21 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,354
Karma: 22265700
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by karl1c View Post
Thanks @theducks. Where in the code is the "bottle neck"? (As you'll know, the other fields are sent from CC and appear to be accepted by the driver, but don't get synced.)

I assume by "Read status", you mean the status and the date, as the date also gets through.
There were special hooks put into Calibre for the reading status fields.
If you really want to edit metadata, use your browser and the content server (edit is a new feature)
theducks is offline   Reply With Quote
Old 11-21-2018, 06:02 PM   #5
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,795
Karma: 2692874
Join Date: Jan 2010
Location: France
Device: Many android devices
If you have looked at the code then you would have seen that the calibre driver syncs only two metadata fields: read and date read. If you want to sync more than that you will need to:
  • modify the calibre driver to accept the field name correspondence
  • define the semantics of the sync (up, down, conflict) in both the single value and list cases
  • change the client to send the original and new values so data change can be detected
  • do the actual data syncing during the startup handshake (change synchronize_with_db in the driver)
  • modify the client to allow the user to define the field name correspondence.
  • return the correct metadata to the client
As calibre is open source, you can do everything except the last two. For those you would need to write your own wireless device client (CC replacement).
chaley is offline   Reply With Quote
Old 11-21-2018, 06:55 PM   #6
karl1c
Junior Member
karl1c began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2017
Device: iPad
Quote:
Originally Posted by chaley View Post
If you have looked at the code then you would have seen that the calibre driver syncs only two metadata fields: read and date read. If you want to sync more than that you will need to:
Thanks @chaley I saw where _is_read_ and _last_read_date_ get picked up and managed to get them to appear in Calibre. However, I noticed that CC sends abbreviated metadata in response to GET_BOOK_COUNT and *full* metadata in response to NOOP, {"priKey": 1}. I assumed that the full metadata wouldn't be sent only to be thrown away and that I must have missed something.

Thanks for the clarification.
karl1c is offline   Reply With Quote
Old 11-21-2018, 10:06 PM   #7
karl1c
Junior Member
karl1c began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2017
Device: iPad
BTW why didn’t you go the whole hog and allow editing of metadata in CC?
karl1c is offline   Reply With Quote
Old 11-22-2018, 05:20 AM   #8
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,795
Karma: 2692874
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by karl1c View Post
BTW why didn’t you go the whole hog and allow editing of metadata in CC?
Because that is hard to do correctly in terms of data types, semantic analysis, conflict analysis, performance, and programming.

And BTW: the metadata isn't "thrown away". It is critical to the metadata caching scheme used to reduce network traffic.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding azw3 annotation support to kindle driver rszasz Development 3 07-31-2017 01:50 PM
Calibre print driver JOELSATX Library Management 1 01-04-2016 11:20 AM
Calibre Companion: changes to calibre's wireless device driver chaley Calibre Companion 3 11-14-2013 03:35 AM
Updated Calibre driver timlegge Kobo Reader 0 11-20-2010 09:21 PM
Calibre now has Kobo driver ! taming Kobo Reader 18 05-27-2010 08:36 PM


All times are GMT -4. The time now is 09:04 PM.


MobileRead.com is a privately owned, operated and funded community.