From 9cc367ae24ee341e507fbd1cf815de527d54195a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 19 Jul 2011 08:09:11 -0600 Subject: [PATCH] MOBI Input: When extracting images, ignore records that are known as non images faster --- src/calibre/ebooks/mobi/reader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index 1173b84266..d704379cf1 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -933,6 +933,9 @@ class MobiReader(object): continue processed_records.append(i) data = self.sections[i][0] + if data[:4] in (b'FLIS', b'FCIS', b'SRCS', b'\xe9\x8e\r\n'): + # A FLIS, FCIS, SRCS or EOF record, ignore + continue buf = cStringIO.StringIO(data) image_index += 1 try: