View Single Post
Old 05-28-2011, 12:25 PM   #18
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,439
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Since the Rating is already pulled into a standard field, why do you want it to be customized? And the only real use I see for number of ratings is to decide whether to trust the ratings or not. Which can become a configurable threshold. The user sets it and the plugins only download rating info if the number is higher than that.

I suggest adding a field extra_fields to the Source class that lists the extra fields the plugin can download. Add some config UI to create mappings, display the extra fields in the global and plugin specific lists only if the mappings have been configured. The config UI would most likely be a button on the global screen that pops up a dialog with a list of available extra fields.

Add knowledge of the following fields to the merge code, the config code (to check that the mapping is to a column of the correct type).

price (the problem here is how to deal with multiple currencies)
pages

whatever else you come up with that is fairly standard
kovidgoyal is offline   Reply With Quote