mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Small performance improvement
This commit is contained in:
parent
ebf08b4e22
commit
33e47e424c
@ -204,9 +204,8 @@ def get_categories(dbcache, sort='name', book_ids=None, icon_map=None,
|
|||||||
continue
|
continue
|
||||||
user_categories[c] = []
|
user_categories[c] = []
|
||||||
for sc in gst[c]:
|
for sc in gst[c]:
|
||||||
if sc in categories.keys():
|
for t in categories.get(sc, ()):
|
||||||
for t in categories[sc]:
|
user_categories[c].append([t.name, sc, 0])
|
||||||
user_categories[c].append([t.name, sc, 0])
|
|
||||||
|
|
||||||
gst_icon = icon_map['gst'] if icon_map else None
|
gst_icon = icon_map['gst'] if icon_map else None
|
||||||
for user_cat in sorted(user_categories.iterkeys(), key=sort_key):
|
for user_cat in sorted(user_categories.iterkeys(), key=sort_key):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user