mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Implement #6523 (New value for existing tweak)
This commit is contained in:
parent
b0a6721540
commit
3b52187aee
@ -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'
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user