diff --git a/src/calibre/srv/render_book.py b/src/calibre/srv/render_book.py index e9c30678d1..cc417bbe94 100644 --- a/src/calibre/srv/render_book.py +++ b/src/calibre/srv/render_book.py @@ -19,6 +19,7 @@ from css_parser.css import CSSRule from calibre import force_unicode, prepare_string_for_xml from calibre.ebooks import parse_css_length from calibre.ebooks.css_transform_rules import StyleDeclaration +from calibre.ebooks.metadata import authors_to_string from calibre.ebooks.oeb.base import ( EPUB_NS, OEB_DOCS, OEB_STYLES, OPF, XHTML, XHTML_NS, XLINK, XPath, rewrite_links, urlunquote @@ -175,10 +176,11 @@ class Container(ContainerBase): tweak_mode = True - def __init__(self, path_to_ebook, tdir, log=None, book_hash=None, save_bookmark_data=False): + def __init__(self, path_to_ebook, tdir, log=None, book_hash=None, save_bookmark_data=False, book_metadata=None): log = log or default_log book_fmt, opfpath, input_fmt = extract_book(path_to_ebook, tdir, log=log) ContainerBase.__init__(self, tdir, opfpath, log) + self.book_metadata = book_metadata if save_bookmark_data: bm_file = 'META-INF/calibre_bookmarks.txt' self.bookmark_data = None @@ -263,26 +265,46 @@ class Container(ContainerBase): }