When tweaking/polishing an azw3 file that does not have an identified content ToC, do not auto-generate one. Fixes #1130729 (azw3 files tweak will duplicate table of contents after rebuild)

This commit is contained in:
Kovid Goyal 2013-02-20 23:45:30 +05:30
parent 725d81a296
commit bdcc52206e

View File

@ -60,7 +60,8 @@ class TOCAdder(object):
else:
oeb.guide.remove('toc')
if not self.has_toc or 'toc' in oeb.guide or opts.no_inline_toc:
if (not self.has_toc or 'toc' in oeb.guide or opts.no_inline_toc or
getattr(opts, 'mobi_passthrough', False)):
return
self.log('\tGenerating in-line ToC')