Added target format to convert-library screen and some minor refactoring of cwa_db
This commit is contained in:
@@ -243,7 +243,8 @@ def convert_library_start():
|
||||
def start_conversion():
|
||||
t1 = Thread(target=convert_library_start)
|
||||
t1.start()
|
||||
return render_title_template('cwa_convert_library.html', title=_("Calibre-Web Automated - Convert Library"), page="cwa-library-convert")
|
||||
return render_title_template('cwa_convert_library.html', title=_("Calibre-Web Automated - Convert Library"), page="cwa-library-convert",
|
||||
target_format=CWA_DB().cwa_settings['auto_convert_target_format'].upper())
|
||||
|
||||
@convert_library.route('/convert-library-status', methods=['GET'])
|
||||
def getStatus():
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
{% block body %}
|
||||
<div class="discover">
|
||||
<h2 style="color: whitesmoke;">{{title}}</h2>
|
||||
<h2 style="color: whitesmoke;">{{title}} - Current Target Format - {{target_format}}</h2>
|
||||
<div>
|
||||
<h3>CWA Library Convertor</h3><br>
|
||||
<div class="row">
|
||||
|
||||
+2
-2
@@ -217,8 +217,8 @@ class CWA_DB:
|
||||
for header in headers:
|
||||
if type(cwa_settings[header]) == int:
|
||||
cwa_settings[header] = bool(cwa_settings[header])
|
||||
cwa_settings['auto_convert_ignored_formats'] = cwa_settings['auto_convert_ignored_formats'].split(',')
|
||||
cwa_settings['auto_ingest_ignored_formats'] = cwa_settings['auto_ingest_ignored_formats'].split(',')
|
||||
elif type(cwa_settings[header]) == str:
|
||||
cwa_settings[header] = cwa_settings[header].split(',')
|
||||
|
||||
return cwa_settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user