diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 80456234b9..d6f134f724 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -24,6 +24,7 @@ series_index_auto_increment = 'next' # invert: use "fn ln" -> "ln, fn" (the original algorithm) # copy : copy author to author_sort without modification # comma : use 'copy' if there is a ',' in the name, otherwise use 'invert' +# nocomma : "fn ln" -> "ln fn" (without the comma) author_sort_copy_method = 'invert' diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index 1e62cffd0f..8ce81c73d5 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -38,7 +38,7 @@ def author_to_author_sort(author): author = _bracket_pat.sub('', author).strip() tokens = author.split() tokens = tokens[-1:] + tokens[:-1] - if len(tokens) > 1: + if len(tokens) > 1 and method != 'nocomma': tokens[0] += ',' return ' '.join(tokens)