mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
bd01d416bc
commit
32464b666b
@ -172,7 +172,7 @@ class EXTHHeader(object):
|
|||||||
|
|
||||||
def read_record(self, pos):
|
def read_record(self, pos):
|
||||||
type_, length = struct.unpack(b'>II', self.raw[pos:pos+8])
|
type_, length = struct.unpack(b'>II', self.raw[pos:pos+8])
|
||||||
data = self.raw[pos+8:pos+length-8]
|
data = self.raw[(pos+8):(pos+length)]
|
||||||
self.records.append(EXTHRecord(type_, data))
|
self.records.append(EXTHRecord(type_, data))
|
||||||
return pos + length
|
return pos + length
|
||||||
|
|
||||||
@ -321,6 +321,7 @@ class MOBIHeader(object):
|
|||||||
ans += '\n\n' + str(self.exth)
|
ans += '\n\n' + str(self.exth)
|
||||||
ans += '\n\nBytes after EXTH: %d'%self.bytes_after_exth
|
ans += '\n\nBytes after EXTH: %d'%self.bytes_after_exth
|
||||||
|
|
||||||
|
ans += '\nRecord 0 length: %d'%len(self.raw)
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
class MOBIFile(object):
|
class MOBIFile(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user