View Single Post
Old 05-10-2010, 05:12 AM   #47
chaley
Grand Sorcerer
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: 12,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
More features: book in library/on device columns

Using code originally written by user_none (thank you!), we have added columns to both the device and library displays that indicate whether a book is on the device or is in the library. When you plug in a device, the column appears and then is filled in appropriately. Unplug the device and the column goes away.

This feature is available in releases 0.6.92 and higher. Download links are in post #1.

Some caveats:
1) the matching algorithm is approximate. Calibre makes its best guess about whether a given book is the same on the device and library. There are two matching schemes, one using title and author, and one using title and a short ID.

The scheme using the short ID is much more accurate, but it requires that the file on the device end in _NNN where NNN is the library key. In the past, only Sony's included this information but now all USB-based devices do it. To get more accurate matching, you will probably need to copy the books to the device again. What worked best for me was to empty my device (I formatted it), then fill it again from Calibre.

Title + author matching checks all authors, which means it won't match if the book has multiple authors but the device saves only one of them (which my Sony Pocket seems to do). It also won't match if the metadata for the format does not match the metadata in the library database.

Neither will match if the title in the book metadata does not match the title in the library metadata.

Bottom line: there is no guarantee that the OnDevice/InLibrary indications are 100% accurate. However, when using the short ID, testing has shown that they are very close.

2) The current beta has some problems with column geometry. When the ondevice column comes and goes, columns to the right change to the size of their neighbor. I am looking for ways to fix this. Work-around: move the column to the end.

3) Deleting books from either the library or the device does not (yet) update the other display. Adding books from the library to the device does the right thing.

4) We have tested it on devices we have: Sony PRS-300, Sony 505, and a Kindle. Other devices *should* work, but the binary goblins are still out there.

As always, have fun.

PS: There might be some comments in this post

Last edited by chaley; 05-10-2010 at 05:19 AM. Reason: Add link to other post, just in case comments end up there
chaley is offline   Reply With Quote