View Single Post
Old 07-25-2015, 04:37 PM   #13
Colerson
Nameless Being
 
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.
It was very quick and dirty, mainly done when I switched from Nook to Kindle, to ensure I was always using the original source in cases of e.g. epub and mobi existing, and not knowing which was original. By using a custom column, the UI is already there, and I wasn't concerned with recursive imports.. but since there is some desire from others for this functionality, I may look into doing it in a more proper fashion.
  Reply With Quote