View Single Post
Old 03-15-2016, 10:01 PM   #10
DavidTC began at the beginning.
Posts: 77
Karma: 10
Join Date: Sep 2011
Device: Nook, Boox C67ML
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.

If you can't get custom columns, I entirely agree that's a bad idea. That would certainly screw me up. Almost all my 'Top, Middle Left, Middle Right, and Bottom' additional lines in the book listing are custom columns.

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.

I think most people are sorta thinking of this as a background operation, so the speed really isn't an issue as long as the rest of the interface can be used, and the new books just show up all at once at the end...and I have no idea how easy that would be.

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.

You surely know the users of CC better than I do. I myself have trouble conceiving of why anyone wouldn't want their entire library on their device. (Except for the sole exception of not enough space.) But from the way you're talking, it seems like *most* people don't put their entire library on their device.

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.

Tasker can send 'Intents', if that's what that is, and has a 'Target' field with the option of 'Broadcast Receiver'. It even has a few blanks to specify 'Extras', so it sounds like what you're talking about.

I am not sure if you mean you have to expose it via some method and haven't done it yet, but just in case, I tried it now and it doesn't do anything currently. (Or I'm doing it wrong.)

If you get that working, I'll gladly provide some step-by-step instructions how to make this happen in Tasker, and when people show up and say 'I want to schedule this to run more than once a day' and 'I want to make it run immediately on connection to certain networks' and 'I want to turn wifi on first', etc, you can say 'Get Tasker and you can do it'.

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.

I was actually building to a suggestion in that comment, but deleted it. Here we go:

For those of us with some technical know-how who couldn't run CC, and didn't want to deal with USB connections, our obvious solution was was usually a Dropbox 'folder device' that we'd send books too. Either all books, or just some of them. Those got the correct metadata. (And a way I'd be happy to switch back to, if CC would pick up that metadata.)

Likewise, there people, occasionally showing up in this very forum, who use CC, but also plug their device in and send books that way, and are confused as to why those books don't show up in CC despite the fact they've carefully told CC to use the same directory that their Calibre device driver uses. (And then the books *do* show up after they've connecting once via CC!) Those books have the correct metadata also.

So the idea I was going to suggest was: Have Calibre put a specific metadata tag on sending the book to a device, a date saying 'This is the right metadata as of {date}'. A tag that *isn't* allowed on books in the library (As in, Calibre strips it from content.odf during 'Add book'.), and is also unlikely to be found on books in the wild.

And CC then only reads and imports books with that tag. CC knows the book has been through Calibre and exported, so it knows the book has somewhat sane metadata. Since the field is a date, CC can even stop from taking the metadata backwards on a refresh, even if the file time has accidentally changed.

The reason I didn't mention it was that you seem to be going somewhere else, so whatever.

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.

Ugh. That's way more work spent on matching books than I would have bothered with, both on CC's end and Calibre's end. I would have just said 'If this doesn't have a Calibre UUID, it ain't a Calibre book and I'm not going to try to match it to one.'.

I actually think this situation is why I started off a bit confused...I find it very strange that someone would try using CC without all books they are trying to manage going through Calibre. That's almost incomprehensible to me that anyone would think that would work at all. (I just wanted my books to take the *long* way around.)

I find it even odder that they'd have the book on their ereader *and* in Calibre but the book on the ereader somehow didn't go through Calibre! Huh?

Are people downloading them on a computer, plugging in their ereader, blindly copying the files over using Explorer, and *also* importing the files into Calibre? And then trying to sync them up later? What spore of madness is this?
DavidTC is offline   Reply With Quote