mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add another method to the custom data API. get_ids_for_custom_book_data('name') returns all books with data named 'name'
This commit is contained in:
parent
67028bd368
commit
ac38246909
@ -2728,6 +2728,10 @@ books_series_link feeds
|
||||
(book_id, name))
|
||||
self.commit()
|
||||
|
||||
def get_ids_for_custom_book_data(self, name):
|
||||
s = self.conn.get('''SELECT book FROM books_plugin_data WHERE name=?''', (name,))
|
||||
return [x[0] for x in s]
|
||||
|
||||
def get_custom_recipes(self):
|
||||
for id, title, script in self.conn.get('SELECT id,title,script FROM feeds'):
|
||||
yield id, title, script
|
||||
|
Loading…
x
Reference in New Issue
Block a user