I've now found a method that produces the result I am looking for:
from calibre.library import database2
db = database2.LibraryDatabase2('Path to calibre library folder')
print(db.prefs.get('categories_using_hierarchy'))
My revised question: is this the best/most efficient way to get this info? I don't have a good feel for how this object is different than the cache object "from calibre.library import db; db=db('Path to calibre library folder').new_api", so would be interested in your thoughts here as well. Thanks for you time once again.
|