View Single Post
Old 05-03-2022, 01:51 PM   #1
jacobalbano
Junior Member
jacobalbano began at the beginning.
 
jacobalbano's Avatar
 
Posts: 5
Karma: 10
Join Date: May 2022
Device: Kobo Libra H2O
Searching for another book by its identifier

Hey all, couldn't find any other topic that answered my question, hopefully I didn't miss anything.

The plugin I'm writing is intended to be able to automatically copy metadata from the first book in a series over to later installments. So for example, I'd import a book with the identifier of "wxyz:1234-2" (this is a custom format that includes the series and volume number), and it would automatically search for the first entry in that series and copy its series name, authors, tags, etc.

However, I can't figure out any way to actually find books in the database from their identifiers. The API does have a field that seems likely, but for some reason it's empty. My tags display with no issue, and I do indeed have books in my library that already have identifiers set.

Code:
>>> db.all_field_names('tags')
frozenset({'Manga', 'GOG', 'Novel', 'Aozora', 'Amazon'})
>>> db.all_field_names('identifiers')
frozenset()
>>>
Am I missing something obvious? Any pointers would be appreciated
jacobalbano is offline   Reply With Quote