Quote:
Originally Posted by DavidTC
Why put there by CC? Because CC reads the metadata out of the books (epubs only). When a book is sent from calibre to CC via the WD connection, the metadata in the book is updated to what is in calibre at that moment. The most important bit is the book's UUID, which permits CC and calibre to agree later on which book in the calibre library matches which book in CC's library.
First, you said you were considering something, and I'm not quite sure what it is, so if you have better ideas, nevermind.
|
Actually, I did. See post #3, where I said
Quote:
Originally Posted by chaley
Others have asked for a variant of this, specifically to be able to automatically update CC's database and book files with information from the cloud. I am still considering the idea. And yes, I know that isn't what you are asking for.
|
There are two variants.
- The first: update metadata in CC's library from the calibre database in the cloud. This makes me nervous because the metadata isn't complete. The values of custom columns built from other columns would be lost. I don't like operations that arguably corrupt the CC library.
- The second: find all books in the cloud library but not in CC's library and add them to CC. This is a more "acceptable" operation because there isn't any data loss; the results would be the same as manually adding the books. It is less acceptable in that the processing required to match all the books in calibre's library to all the books in CC's library would be slow and possibly memory consumptive. The only practical (performance-wise) way I can see to do it is to build two sets of UUIDs, one of the books in CC and the other of the books in calibre, then do a set difference (calibre - cc). The result will be the books that must be added to CC. And BTW: such a process would work for all cloud libraries, not just local libraries.
And of course I must decide whether the time spent building something like either one of these will be justified by its use. I am not convinced yet.
Quote:
I don't supposed I could at least get Tasker support to trigger a connection, which would let me do it when the device was actually *on* the correct network? Tasker can trigger an Activity in an app, so if you'd just expose 'Connect' as one...
|
Auto-connection is triggered by a broadcast. There isn't an activity involved. I don't have a problem with exposing the broadcast receiver in CC V5 (in fact I just changed the manifest), but I don't know if "Tasker" can send broadcast events. The receiver name is com.multipie.cclibrary.ConnectionAlarmReceiver. It takes no extras.
Quote:
But it's clear I've been wrong about some stuff, namely, I thought that CC *couldn't* read the metadata of epubs, or at least that was something you seriously wanted to avoid, so I was proposing hacks using the Calibre db. I thought reading book metadata was flatly something you wouldn't do.
But as CC *does* turn out read them, which is how it does the 'link them up with Calibre books'. Which means all my 'Get the metadata somehow' ideas were pointless.
|
No, they aren't. CC can read metadata from epubs, but the results are very iffy. As I said before, there is no reason to believe that the book has correct embedded metadata. Calibre does not update metadata in books in the library unless the user takes specific action. I do not wish to build new features that depend on a process that is known not to be reliable.
Quote:
That means, right now, 'Scan all books and add them using their internal metadata' could be possible, in theory, and the only reason CC doesn't have it as a menu item is that it would cause problems with people who just drop non-Calibre books in there?
|
Or "calibre books" that have not had their embedded metadata updated, which is the normal state of books in a calibre library. Or books that are not epub. Or books that are in the wrong folder.
Embedded metadata is updated when calibre sends books via a "device" connection such as CC's wireless device. This is why extracting metadata from books (epubs) sent by calibre has a much better chance of working than books in cloud libraries or that come out of the sky.
Quote:
Or is CC only reading the Calibre UUID, and then gets all the other information from Calibre?
|
CC extracts what metadata it can from epubs. It then constructs a metadata packet and sends that to calibre. If that packet contains a UUID then calibre will use it to match the book to a book in calibre's library. If there isn't a UUID or if the UUID is not in calibre's library then calibre goes through a process of "book matching", comparing the title and author of the book to books in calibre's library. Matching works if a close-to-exact match is found. This process very often matches nothing or the wrong book. The user must clean up any remaining mess.
If a book is matched, calibre sends the metadata from the library book to CC. This metadata will have the correct UUID in it, meaning that in the future CC and calibre will agree on the match. Of course, it could have incorrect metadata, in which case things aren't ideal.
For non-epub, CC sends the entire book to calibre for analysis. This is very slow.