View Single Post
Old 11-03-2012, 09:27 AM   #16
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by PeterT View Post
I think what I find perplexing is that surely the same logic for matching is being used between the OLD driver and the NEW; the only additional bit the NEW driver needs is the shelf management.
That's not completely true. I did make a few changes in the KOBO driver when I created the KOBOTOUCH driver. You would have to test with a pre-Touch device to see the exact differences.
Quote:
Both drivers have access to the same database on the Touch, and the same metadata values.
The issue is the mangling of the title under different circumstances. I had an error where I used the sort title instead of the real title. I did this to handle the plugboard changes, but it didn't work if the title started with an article. This should have been fixed with 0.9.5.

I can still break it. And, after a lot of work tonight, I know why. There are two reasons. One is that the file size doesn't get set in metadata.calibre when a book is first sent to the device. Because of that, the next time calibre reads the file and device, it sees a mismatch and extracts the metadata from the book. If the UUID it gets doesn't match what calibre is expecting, it tries to match on the author and title. If the title has been through a plugboard, this might not work. I've fixed the file size issue, so that should close that hole.

The other time it has problems is if you send a book, close calibre and reopen calibre without disconnection the device. As the driver reads the database for books, it won't find the book you added. It then drops it from the metadata.calibre and won't display it in the device list. After you disconnect, and the book is added to the devices database, when you next connect and calibre tries to match it to its library, it will have the same problem as above. The old driver has this problem as well. I remember seeing it, and sending the book to the device again, usually fixed the matching. I have a solution for this in mind.

Your single letter shelves are a side effect of either your plugboard or your save template. Or maybe a combination of both. When the driver finds a book in the devices database that isn't in the metadata.calibre, it reads the metadata from the file. It is using calibre methods to do this, and one of them tries to reverse the plugboard or template. That seems to be what is happening, but I haven't traced it enough to be sure. When I use your settings, the book gets a series of the first character of the title of the book. Then a shelf gets created for that character.
davidfor is offline   Reply With Quote