mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Handle EPUB files that erroneously list the OPF itself in the OPF manifest with an incorrect mime type
This commit is contained in:
parent
7a307a2e24
commit
3edec38469
@ -143,7 +143,7 @@ class Container(object): # {{{
|
||||
for item in self.opf_xpath('//opf:manifest/opf:item[@href and @media-type]'):
|
||||
href = item.get('href')
|
||||
name = self.href_to_name(href, self.opf_name)
|
||||
if name in self.mime_map:
|
||||
if name in self.mime_map and name != self.opf_name:
|
||||
self.mime_map[name] = item.get('media-type')
|
||||
|
||||
def clone_data(self, dest_dir):
|
||||
|
Loading…
x
Reference in New Issue
Block a user