mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2034 (LRFMetaFile conflict on "objects")
This commit is contained in:
parent
74486fc40d
commit
77f2f9d76f
@ -527,7 +527,7 @@ class LRFMetaFile(object):
|
||||
""" See L{file.write} """
|
||||
self._file.write(val)
|
||||
|
||||
def objects(self):
|
||||
def _objects(self):
|
||||
self._file.seek(self.object_index_offset)
|
||||
c = self.number_of_objects
|
||||
while c > 0:
|
||||
@ -540,7 +540,7 @@ class LRFMetaFile(object):
|
||||
def get_objects_by_type(self, type):
|
||||
from calibre.ebooks.lrf.tags import Tag
|
||||
objects = []
|
||||
for id, offset, size in self.objects():
|
||||
for id, offset, size in self._objects():
|
||||
self._file.seek(offset)
|
||||
tag = Tag(self._file)
|
||||
if tag.id == 0xF500:
|
||||
@ -551,7 +551,7 @@ class LRFMetaFile(object):
|
||||
|
||||
def get_object_by_id(self, tid):
|
||||
from calibre.ebooks.lrf.tags import Tag
|
||||
for id, offset, size in self.objects():
|
||||
for id, offset, size in self._objects():
|
||||
self._file.seek(offset)
|
||||
tag = Tag(self._file)
|
||||
if tag.id == 0xF500:
|
||||
|
Loading…
x
Reference in New Issue
Block a user