diff --git a/src/calibre/db/categories.py b/src/calibre/db/categories.py index d169e5a5c4..1b57fe8e0a 100644 --- a/src/calibre/db/categories.py +++ b/src/calibre/db/categories.py @@ -14,7 +14,7 @@ from calibre.library.field_metadata import TagsIcons from calibre.utils.config_base import tweaks from calibre.utils.icu import sort_key -CATEGORY_SORTS = { 'name', 'popularity', 'rating' } +CATEGORY_SORTS = ('name', 'popularity', 'rating') # This has to be a tuple not a set class Tag(object): diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 5149b7a0de..d93833ae9c 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -44,7 +44,7 @@ from calibre.utils.recycle_bin import delete_file, delete_tree from calibre.utils.formatter_functions import load_user_template_functions from calibre.db.errors import NoSuchFormat from calibre.db.lazy import FormatMetadata, FormatsList -from calibre.db.categories import Tag +from calibre.db.categories import Tag, CATEGORY_SORTS from calibre.utils.localization import (canonicalize_lang, calibre_langcode_to_name) @@ -1644,7 +1644,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): ########## data structures for get_categories - CATEGORY_SORTS = ('name', 'popularity', 'rating') + CATEGORY_SORTS = CATEGORY_SORTS MATCH_TYPE = ('any', 'all') class TCat_Tag(object):