![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2011
Device: none
|
First Plugin
I am working on writing my first plugin and am confused about the nature of the db object in an add on and the db.new_api. I am writing a user interface plugin to merge books while maintaining all the formats and metadata from the merged book.
I have hacked it together and it works for my purpose, but it seems like in some commands I needed to use db and others db.new_api. Is there a best practice on when to use one over the other? Is on expected to be deprecated and we should move to the other? Thanks Joe |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,449
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Always use db.new_api. You only need to use db itsefl if you are dealing with the view of books in the calibre UI.
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jul 2011
Device: none
|
Awesome.. thanks for the quick response, I will review my code and make sure that's all I used.
Thanks Joe |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] LOI-Generator - edit] plugin to generate a List of Illustrations | KevinH | Plugins | 1 | 01-19-2023 04:31 PM |
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) | mneimeyer | Plugins | 3 | 11-11-2019 08:07 PM |
[Plugin] QuickPrefsEdit - Edit plugin prefs json files. | slowsmile | Plugins | 3 | 07-25-2018 08:14 PM |
Goodread Perception Expander plugin not shown on plugin list (kobo h2o) | www | KOReader | 4 | 09-28-2017 10:34 AM |