automatically set config_converterpath

This commit is contained in:
Thore Schillmann 2022-06-30 13:05:36 +00:00
parent e39c6130c3
commit a77aef83c6
2 changed files with 3 additions and 8 deletions

View File

@ -1722,12 +1722,14 @@ def _configuration_update_helper():
_config_string(to_save, "config_calibre")
_config_string(to_save, "config_binariesdir")
_config_string(to_save, "config_converterpath")
_config_string(to_save, "config_kepubifypath")
if "config_binariesdir" in to_save:
calibre_status = helper.check_calibre(config.config_binariesdir)
if calibre_status:
return _configuration_result(calibre_status)
# ToDo: Remove this and 'self.config_converterpath' and replace with 'config.get_calibre_binarypath("ebook-convert")' everywhere
to_save["config_converterpath"] = config.get_calibre_binarypath("ebook-convert")
_config_string(to_save, "config_converterpath")
reboot_required |= _config_int(to_save, "config_login_type")

View File

@ -330,13 +330,6 @@
<button type="button" data-toggle="modal" id="binaries_modal_path" data-link="config_binariesdir" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
</span>
</div>
<label for="config_converterpath">{{_('Path to Calibre E-Book Converter')}}</label>
<div class="form-group input-group">
<input type="text" class="form-control" id="config_converterpath" name="config_converterpath" value="{% if config.config_converterpath != None %}{{ config.config_converterpath }}{% endif %}" autocomplete="off">
<span class="input-group-btn">
<button type="button" data-toggle="modal" id="converter_modal_path" data-link="config_converterpath" data-target="#fileModal" class="btn btn-default"><span class="glyphicon glyphicon-folder-open"></span></button>
</span>
</div>
<div class="form-group">
<label for="config_calibre">{{_('Calibre E-Book Converter Settings')}}</label>
<input type="text" class="form-control" id="config_calibre" name="config_calibre" value="{% if config.config_calibre != None %}{{ config.config_calibre }}{% endif %}" autocomplete="off">