View Single Post
Old 10-08-2011, 02:56 PM   #66
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,387
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Kolenka: I haven't had a chance to review your code, but on general principles...

The USBMS classes maintain a cache of metadata read from the ebook files in the file metadata.calibre in the root of the device. You should allow USBMS to read metadata from the files as normal (this will automatically use the cache wherever possible). Then take the resulting books and match them against entries in the SONY db. This gives you excellent performance (after the initial scan) and it allows you to present correct and complete metadata to the user in the device view without having to rely on the vagaries of SONY's metadata reading implementation.

See for example the books() and sync_booklists() methods in the old sony driver.

Last edited by kovidgoyal; 10-08-2011 at 03:08 PM.
kovidgoyal is online now   Reply With Quote