MOBI Input: When extracting images, ignore records that are known as non images faster

This commit is contained in:
Kovid Goyal 2011-07-19 08:09:11 -06:00
parent 93fef1787e
commit 9cc367ae24

View File

@ -933,6 +933,9 @@ class MobiReader(object):
continue continue
processed_records.append(i) processed_records.append(i)
data = self.sections[i][0] 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) buf = cStringIO.StringIO(data)
image_index += 1 image_index += 1
try: try: