1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-30 23:03:02 +00:00

Bugfix after merge

This commit is contained in:
Ozzie Isaacs
2023-02-27 13:09:18 +01:00
parent a414db0243
commit 7ff4747f63
3 changed files with 212 additions and 308 deletions

View File

@@ -47,11 +47,9 @@ def get_epub_layout(book, book_data):
'n': 'urn:oasis:names:tc:opendocument:xmlns:container',
'pkg': 'http://www.idpf.org/2007/opf',
}
file_path = os.path.normpath(os.path.join(config.config_calibre_dir, book.path, book_data.name + "." + book_data.format.lower()))
epubZip = zipfile.ZipFile(file_path)
txt = epubZip.read('META-INF/container.xml')
tree = etree.fromstring(txt)
cfname = tree.xpath('n:rootfiles/n:rootfile/@full-path', namespaces=ns)[0]