From a90c68d8e9d12902f736e5c7313ae9f03d5548d9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 25 Nov 2015 08:55:17 +0530 Subject: [PATCH] ... --- src/calibre/db/legacy.py | 2 +- src/calibre/library/database2.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/db/legacy.py b/src/calibre/db/legacy.py index 6157ad1878..90280dfbcb 100644 --- a/src/calibre/db/legacy.py +++ b/src/calibre/db/legacy.py @@ -776,7 +776,7 @@ LibraryDatabase.format_hash = MT(lambda self, book_id, fmt:self.new_api.format_h LibraryDatabase.index = MT(lambda self, book_id, cache=False:self.data.id_to_index(book_id)) LibraryDatabase.has_cover = MT(lambda self, book_id:self.new_api.field_for('cover', book_id)) LibraryDatabase.get_tags = MT(lambda self, book_id:set(self.new_api.field_for('tags', book_id))) -LibraryDatabase.get_categories = MT(lambda self, sort='name', ids=None, icon_map=None:self.new_api.get_categories(sort=sort, book_ids=ids, icon_map=icon_map)) +LibraryDatabase.get_categories = MT(lambda self, sort='name', ids=None:self.new_api.get_categories(sort=sort, book_ids=ids)) LibraryDatabase.get_identifiers = MT( lambda self, index, index_is_id=False: self.new_api.field_for('identifiers', index if index_is_id else self.id(index))) LibraryDatabase.isbn = MT( diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 717945918f..381c243f17 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -1768,7 +1768,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): pass return new_cats - def get_categories(self, sort='name', ids=None, icon_map=None): + def get_categories(self, sort='name', ids=None): #start = last = time.clock() if sort not in self.CATEGORY_SORTS: raise ValueError('sort ' + sort + ' not a valid value') @@ -1954,7 +1954,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): # icon_map is not None if get_categories is to store an icon and # possibly a tooltip in the tag structure. - icon = None + icon = icon_map = None label = tb_cats.key_to_label(category) if icon_map: if not tb_cats.is_custom_field(category):