mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix font mime-types not being auto-corrected when upgrading EPUBs from 2 to 3
This commit is contained in:
parent
b086766064
commit
8fac38cf4d
@ -25,7 +25,7 @@ def add_properties(item, *props):
|
||||
def fix_font_mime_types(container):
|
||||
for item in container.opf_xpath('//opf:manifest/opf:item[@href and @media-type]'):
|
||||
mt = item.get('media-type') or ''
|
||||
if mt.lower() not in OEB_FONTS:
|
||||
if mt.lower() in OEB_FONTS:
|
||||
name = container.href_to_name(item.get('href'), container.opf_name)
|
||||
item.set('media-type', container.guess_type(name))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user