View Single Post
Old 06-19-2012, 06:16 AM   #2
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,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I just committed some code you can use for a per library preference store:

db.prefs.set_namespaced(namespace, key, val)
db.prefs.get_namespaced(namespace, key, default=None)

use your plugin import name as the namespace (though you can use anything you like).

For the second question, there is no mechanism for that, and the development of such a mechanism will have to wait for the development of multi-client calibre
kovidgoyal is offline   Reply With Quote