mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 09:03:43 +02:00
...
This commit is contained in:
parent
3701823c47
commit
4599583764
1 changed files with 4 additions and 1 deletions
|
|
@ -259,6 +259,7 @@ def ajax_category(self, name, sort='title', num=100, offset=0,
|
|||
subcategories = []
|
||||
meta = fm[toplevel]
|
||||
item_names = {}
|
||||
children = set()
|
||||
|
||||
if meta['kind'] == 'user':
|
||||
fullname = ((toplevel + '.' + subcategory) if subcategory is not
|
||||
|
|
@ -282,7 +283,6 @@ def ajax_category(self, name, sort='title', num=100, offset=0,
|
|||
category_name = toplevel[1:].split('.')
|
||||
# When browsing by user categories we ignore hierarchical normal
|
||||
# columns, so children can be empty
|
||||
children = set()
|
||||
|
||||
elif toplevel in hierarchical_categories:
|
||||
items = []
|
||||
|
|
@ -312,6 +312,9 @@ def ajax_category(self, name, sort='title', num=100, offset=0,
|
|||
subcategories = [{'name':x.rpartition('.')[-1],
|
||||
'url':hexlify(toplevel+'.'+x),
|
||||
'icon':category_icon(toplevel, meta)} for x in children]
|
||||
else:
|
||||
items = categories[toplevel]
|
||||
category_name = meta['name']
|
||||
|
||||
for x in subcategories:
|
||||
x['url'] = category_url(self.opts.url_prefix, x['url'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue