Quote:
Originally Posted by kovidgoyal
Not sure what you are asking for exactly, but you first get the set of all book ids in the current virtual library. THen after that call
Code:
ans = set()
for book_id in book_ids:
ans |= {x for x in db.new_api.field_ids_for('tags', book_id)}
and use get_id_map() to convert the ids from ans into names.
|
Hi Kovid - thanks for the reply. What I wanted was exactly the same output that the direct db functions above give me, of pairs of ids with their text value. e.g. all the unique author id + their name combinations.
So it appears that indeed the answer is I need to iterate over all the books and build up my own (unique) sets...