mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #879495 (download metadata)
This commit is contained in:
parent
55cb29e150
commit
52f1459a22
@ -285,14 +285,15 @@ class Source(Plugin):
|
|||||||
|
|
||||||
if authors:
|
if authors:
|
||||||
# Leave ' in there for Irish names
|
# Leave ' in there for Irish names
|
||||||
remove_pat = re.compile(r'[,!@#$%^&*(){}`~"\s\[\]/]')
|
remove_pat = re.compile(r'[!@#$%^&*(){}`~"\s\[\]/]')
|
||||||
replace_pat = re.compile(r'[-+.:;]')
|
replace_pat = re.compile(r'[-+.:;,]')
|
||||||
if only_first_author:
|
if only_first_author:
|
||||||
authors = authors[:1]
|
authors = authors[:1]
|
||||||
for au in authors:
|
for au in authors:
|
||||||
|
has_comma = ',' in au
|
||||||
au = replace_pat.sub(' ', au)
|
au = replace_pat.sub(' ', au)
|
||||||
parts = au.split()
|
parts = au.split()
|
||||||
if ',' in au:
|
if has_comma:
|
||||||
# au probably in ln, fn form
|
# au probably in ln, fn form
|
||||||
parts = parts[1:] + parts[:1]
|
parts = parts[1:] + parts[:1]
|
||||||
for tok in parts:
|
for tok in parts:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user