View Single Post
Old 07-26-2015, 01:54 PM   #14
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
Quote:
Originally Posted by kovidgoyal View Post
Just a word of warning, dont use this patch, it modifies the calibre database schema, which is not a safe thing to do.

@Colerson: While I am assuming this patch is really "for your own use", so you dont want to spend too much time on it -- I'd suggest using add_custom_book_data()/get_custom_book_data() instead of adding a column to the db. And you have to deal with the case when the book being added has multiple formats, which can happen during a recursive import (right clicking the add books button). And you'd need to provide some UI to allow the user to change the "initial format", since you are basing conversions off it.
And to be really solid, it needs to deal with merged books where more than one file is an "original", one from each of the merged records. And, of course, it needs a way to manually fix the record when the code's decision as to which to call the "original" is not the user's choice. The fix would need to include the option to choose no original on an individual record basis.
dwig is offline   Reply With Quote