EPUB Input: Auto set the media-type for OPF manifest entries with an empty media-type

This commit is contained in:
Kovid Goyal 2012-04-27 23:07:07 +05:30
parent bf6eda95ab
commit 3402571cfc

View File

@ -256,7 +256,7 @@ class OEBReader(object):
media_type = elem.get('media-type', None)
if media_type is None:
media_type = elem.get('mediatype', None)
if media_type is None or media_type == 'text/xml':
if not media_type or media_type == 'text/xml':
guessed = guess_type(href)[0]
media_type = guessed or media_type or BINARY_MIME
if hasattr(media_type, 'lower'):