Fix #3117 (Calibre inverts author names even when it doesn't need to)

This commit is contained in:
Kovid Goyal 2009-08-09 08:53:54 -06:00
parent d55a37c41f
commit d668f536d6

View File

@ -78,7 +78,10 @@ class EXTHHeader(object):
if id == 100:
if self.mi.authors == [_('Unknown')]:
self.mi.authors = []
self.mi.authors.append(content.decode(codec, 'ignore').strip())
au = content.decode(codec, 'ignore').strip()
self.mi.authors.append(au)
if re.match(r'\S+?\s*,\s+\S+', au.strip()):
self.mi.author_sort = au.strip()
elif id == 101:
self.mi.publisher = content.decode(codec, 'ignore').strip()
elif id == 103: