From 700b0609dfd528d9004c89411c0e41ecdac51530 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Nov 2020 21:36:49 +0100 Subject: [PATCH] Don't recompute metadata for epubs --- cps/epub.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/epub.py b/cps/epub.py index 779c1ca2..583e4eda 100644 --- a/cps/epub.py +++ b/cps/epub.py @@ -66,11 +66,11 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension): tmp = p.xpath('dc:%s/text()' % s, namespaces=ns) if len(tmp) > 0: if s == 'creator': - epub_metadata[s] = ' & '.join(split_authors(p.xpath('dc:%s/text()' % s, namespaces=ns))) + epub_metadata[s] = ' & '.join(split_authors(tmp)) elif s == 'subject': - epub_metadata[s] = ', '.join(p.xpath('dc:%s/text()' % s, namespaces=ns)) + epub_metadata[s] = ', '.join(tmp) else: - epub_metadata[s] = p.xpath('dc:%s/text()' % s, namespaces=ns)[0] + epub_metadata[s] = tmp[0] else: epub_metadata[s] = u'Unknown'