|
|
#1 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2014
Device: Kindle
|
Access custom fields from metadata DB
Hello,
I try to write my first Calibre plugin and have some problems extracting especially the custom fields with the db api. what I do is this: Code:
db = self.gui.current_db.new_api
book_ids = self.gui.library_view.get_selected_ids()
for bid in book_ids:
lh = db.get_metadata(bid)
But how can I access the custom field to store them in variables ? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,600
Karma: 28548974
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
db.field_for('#mycolumn', book_id)
or lh.get('#mycolumn') |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2014
Device: Kindle
|
Works thank you
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Adding custom fields to the main UI | karimnaguib | Library Management | 5 | 10-06-2013 09:27 PM |
| Sorting books on disk with custom fields | Fleckenteufel | Library Management | 0 | 10-30-2012 11:55 AM |
| question on custom fields | Keltari | Library Management | 5 | 08-26-2011 02:58 PM |
| copy between libs, keep custom fields | drMerry | Library Management | 1 | 05-24-2011 06:56 PM |
| Catalogs & Custom Fields | nynaevelan | Library Management | 14 | 10-27-2010 04:55 PM |