diff --git a/epubfile.py b/epubfile.py index ce850fe..16d225c 100644 --- a/epubfile.py +++ b/epubfile.py @@ -1106,6 +1106,9 @@ class Epub: for tag in self.opf.descendants: if tag.name: tag.name = tag.name.replace('opf:', '') + for item in self.get_manifest_items(soup=True): + if item['href'] in ['toc.ncx', 'Misc/toc.ncx']: + item['media-type'] = 'application/x-dtbncx+xml' # COMMAND LINE TOOLS