diff --git a/src/calibre/library/server/browse.py b/src/calibre/library/server/browse.py index 89b1fe9afc..dc8494dc13 100644 --- a/src/calibre/library/server/browse.py +++ b/src/calibre/library/server/browse.py @@ -17,6 +17,7 @@ from calibre.utils.ordered_dict import OrderedDict from calibre.utils.filenames import ascii_filename from calibre.utils.config import prefs from calibre.library.comments import comments_to_html +from calibre.library.server import custom_fields_to_display def render_book_list(ids, suffix=''): # {{{ pages = [] @@ -266,6 +267,7 @@ class BrowseServer(object): def getter(x): return category_meta[x]['name'].lower() + displayed_custom_fields = custom_fields_to_display(self.db) for category in sorted(categories, cmp=lambda x,y: cmp(getter(x), getter(y))): if len(categories[category]) == 0: @@ -275,6 +277,8 @@ class BrowseServer(object): meta = category_meta.get(category, None) if meta is None: continue + if meta['is_custom'] and category not in displayed_custom_fields: + continue cats.append((meta['name'], category)) cats = ['