If your plugin is running in the GUI process use the database like this
gui = get_gui()
db = gui.library_view.model().db
db.add_books(...)
see database2.py for the methods db supports.
If your plugin is running out of process use
calibredb add
As for getting files from the content server, its a simple URL scheme just look at a few of the urls generated by the content server for file downloads, or look at the code in server/content.py
|