Dont allow recipes to override no_inline_navbars

This is an internal setting used by the conversion system, based on the
selected output profile.
This commit is contained in:
Kovid Goyal 2022-07-12 18:26:40 +05:30
parent b93af62abf
commit 194468d790
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -58,6 +58,7 @@ class RecipeInput(InputFormatPlugin):
accelerators): accelerators):
from calibre.web.feeds.recipes import compile_recipe from calibre.web.feeds.recipes import compile_recipe
opts.output_profile.flow_size = 0 opts.output_profile.flow_size = 0
orig_no_inline_navbars = opts.no_inline_navbars
if file_ext == 'downloaded_recipe': if file_ext == 'downloaded_recipe':
from calibre.utils.zipfile import ZipFile from calibre.utils.zipfile import ZipFile
zf = ZipFile(recipe_or_file, 'r') zf = ZipFile(recipe_or_file, 'r')
@ -139,6 +140,7 @@ class RecipeInput(InputFormatPlugin):
for key, val in self.recipe_object.conversion_options.items(): for key, val in self.recipe_object.conversion_options.items():
setattr(opts, key, val) setattr(opts, key, val)
opts.no_inline_navbars = orig_no_inline_navbars
for f in os.listdir('.'): for f in os.listdir('.'):
if f.endswith('.opf'): if f.endswith('.opf'):