mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 01:23:42 +02:00
Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
commit
62b4aab4b3
1 changed files with 3 additions and 1 deletions
|
|
@ -1411,7 +1411,9 @@ class BuiltinUserCategories(BuiltinFormatterFunction):
|
|||
|
||||
def evaluate(self, formatter, kwargs, mi, locals_):
|
||||
if hasattr(mi, '_proxy_metadata'):
|
||||
return ', '.join(k for k, v in mi._proxy_metadata.user_categories.iteritems() if v)
|
||||
cats = set(k for k, v in mi._proxy_metadata.user_categories.iteritems() if v)
|
||||
cats = sorted(cats, key=sort_key)
|
||||
return ', '.join(cats)
|
||||
return _('This function can be used only in the GUI')
|
||||
|
||||
class BuiltinTransliterate(BuiltinFormatterFunction):
|
||||
|
|
|
|||
Loading…
Reference in a new issue