Full text search: Fix books edit with the edit book tool not being automatically re-indexed

This commit is contained in:
Kovid Goyal 2022-07-13 08:26:22 +05:30
parent bbcd3bce1a
commit 4305a799fb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -790,6 +790,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
db = m.db.new_api
if m.db.library_id == library_id and db.has_id(book_id):
db.format_metadata(book_id, fmt, allow_cache=False, update_db=True)
db.reindex_fts_book(book_id, fmt)
db.update_last_modified((book_id,))
m.refresh_ids((book_id,))
db.event_dispatcher(db.EventType.book_edited, book_id, fmt)