From 3402571cfc9e4214ab25177d6d05f4bd1239f042 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 27 Apr 2012 23:07:07 +0530 Subject: [PATCH] EPUB Input: Auto set the media-type for OPF manifest entries with an empty media-type --- src/calibre/ebooks/oeb/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/reader.py b/src/calibre/ebooks/oeb/reader.py index e83d60a28c..c9a8429f3b 100644 --- a/src/calibre/ebooks/oeb/reader.py +++ b/src/calibre/ebooks/oeb/reader.py @@ -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'):