mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cleanup previous PR
This commit is contained in:
parent
abaf03984d
commit
2a3fdcc3d5
@ -167,7 +167,6 @@ def get_gpref(name: str, defval = None):
|
||||
|
||||
|
||||
def get_icon_for_node(node, parent, node_to_tag_map, tag_map, eval_formatter, db):
|
||||
# This needs a legacy database so legacy formatter functions work
|
||||
category = node['category']
|
||||
if category in ('search', 'formats') or category.startswith('@'):
|
||||
return
|
||||
|
@ -249,11 +249,8 @@ class FormatterFunction:
|
||||
only_in_gui_error(self.name)
|
||||
|
||||
def get_database(self, mi, formatter=None):
|
||||
if formatter is not None:
|
||||
if hasattr(formatter, 'database'):
|
||||
db = formatter.database
|
||||
if db is not None:
|
||||
return db
|
||||
if (db := getattr(formatter, 'database', None)) is not None:
|
||||
return db
|
||||
return get_database(mi, self.name)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user