mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 02:06:19 +01:00
EPUB 3 metadata: If the book defines more than one author sort value for an author use all of them instead of only the last one
This commit is contained in:
parent
d01236eff5
commit
fb4504382b
1 changed files with 2 additions and 2 deletions
|
|
@ -443,7 +443,7 @@ def author(item, props, val):
|
|||
aus = None
|
||||
file_as = props.get('file-as')
|
||||
if file_as:
|
||||
aus = file_as[-1][-1]
|
||||
aus = authors_to_string([x[-1] for x in file_as])
|
||||
else:
|
||||
aus = item.get(OPF('file-as')) or None
|
||||
return Author(normalize_whitespace(val), normalize_whitespace(aus))
|
||||
|
|
@ -617,9 +617,9 @@ def read_last_modified(root, prefixes, refines):
|
|||
except Exception:
|
||||
continue
|
||||
|
||||
|
||||
def set_last_modified(root, prefixes, refines, val=None):
|
||||
pq = '%s:modified' % reserved_prefixes['dcterms']
|
||||
sq = '%s:w3cdtf' % reserved_prefixes['dcterms']
|
||||
val = w3cdtf(val or utcnow())
|
||||
for meta in XPath('./opf:metadata/opf:meta[@property]')(root):
|
||||
prop = expand_prefix(meta.get('property'), prefixes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue