Edit Book: When creating an NCX file from the Edit Table of Contents tool, do not use uuids for element ids

This commit is contained in:
Kovid Goyal 2014-09-27 10:12:01 +05:30
parent f415c6ad80
commit 7a75352d47

View File

@ -422,7 +422,7 @@ def create_ncx(toc, to_href, btitle, lang, uid):
def process_node(xml_parent, toc_parent): def process_node(xml_parent, toc_parent):
for child in toc_parent: for child in toc_parent:
play_order['c'] += 1 play_order['c'] += 1
point = etree.SubElement(xml_parent, NCX('navPoint'), id=uuid_id(), point = etree.SubElement(xml_parent, NCX('navPoint'), id='num_%d' % play_order['c'],
playOrder=str(play_order['c'])) playOrder=str(play_order['c']))
label = etree.SubElement(point, NCX('navLabel')) label = etree.SubElement(point, NCX('navLabel'))
title = child.title title = child.title