mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Get linear attrib for spine names as well
This commit is contained in:
parent
47b438db2b
commit
e34477da93
@ -319,15 +319,15 @@ class Container(object): # {{{
|
||||
path = self.name_path_map.get(name, None)
|
||||
if path:
|
||||
if item.get('linear', 'yes') == 'yes':
|
||||
yield name
|
||||
yield name, True
|
||||
else:
|
||||
non_linear.append(name)
|
||||
for name in non_linear:
|
||||
yield name
|
||||
yield name, False
|
||||
|
||||
@property
|
||||
def spine_items(self):
|
||||
for name in self.spine_names:
|
||||
for name, linear in self.spine_names:
|
||||
yield self.name_path_map[name]
|
||||
|
||||
def remove_item(self, name):
|
||||
|
@ -35,7 +35,7 @@ class ContainerTests(BaseTest):
|
||||
self.assertIn(name, c2.name_path_map)
|
||||
self.assertEqual(c1.open(name).read(), c2.open(name).read(), 'The file %s differs' % name)
|
||||
|
||||
spine_names = tuple(c1.spine_names)
|
||||
spine_names = tuple(x[0] for x in c1.spine_names)
|
||||
text = spine_names[0]
|
||||
root = c2.parsed(text)
|
||||
root.xpath('//*[local-name()="body"]')[0].set('id', 'changed id for test')
|
||||
|
Loading…
x
Reference in New Issue
Block a user