Allow searching by format in the tag browser context menu

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2020-07-17 19:36:15 +05:30
commit 5464868ae4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -186,6 +186,7 @@ def add_format_entries(menu, data, book_info):
from calibre.gui2.ui import get_gui
book_id = int(data['book_id'])
fmt = data['fmt']
init_find_in_tag_browser(menu, book_info.find_in_tag_browser_action, 'formats', fmt)
db = get_gui().current_db.new_api
ofmt = fmt.upper() if fmt.startswith('ORIGINAL_') else 'ORIGINAL_' + fmt
nfmt = ofmt[len('ORIGINAL_'):]