From 509d3671d662181de52c6cfd157ed67d0dbe4727 Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Thu, 29 Jan 2009 13:59:13 -0500 Subject: [PATCH] Fix some glitches in OEBBook OPF parsing & generation. --- src/calibre/ebooks/oeb/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 0cfdec6355..a1c7703122 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -552,7 +552,7 @@ class Manifest(object): elif media_type in OEB_STYLES: media_type = CSS_MIME attrib = {'id': item.id, 'href': item.href, - 'media-type': item.media_type} + 'media-type': media_type} if item.fallback: attrib['fallback'] = item.fallback element(elem, OPF('item'), attrib=attrib) @@ -937,7 +937,7 @@ class OEBBook(object): spine.add(item, elem.get('linear')) extras = [] for item in self.manifest.values(): - if item.media_type == XHTML_MIME \ + if item.media_type in OEB_DOCS \ and item not in spine: extras.append(item) extras.sort()