Merge remote-tracking branch 'opds/bugfix_2419'

Bugfix send emails
This commit is contained in:
Ozzie Isaacs
2022-06-06 09:00:09 +02:00
5 changed files with 966 additions and 712 deletions
+6 -5
View File
@@ -1269,8 +1269,8 @@ def update_mailsettings():
_config_string(to_save, "mail_password")
_config_int(to_save, "mail_size", lambda y: int(y)*1024*1024)
config.mail_server = to_save.get('mail_server', "").strip()
config.mail_from = to_save.get('mail_login', "").strip()
config.email = to_save.get('mail_login', "").strip()
config.mail_from = to_save.get('mail_from', "").strip()
config.mail_login = to_save.get('mail_login', "").strip()
try:
config.save()
except (OperationalError, InvalidRequestError) as e:
@@ -1671,9 +1671,10 @@ def _db_configuration_update_helper():
if db_change or not db_valid or not config.db_configured \
or config.config_calibre_dir != to_save["config_calibre_dir"]:
if not calibre_db.setup_db(to_save['config_calibre_dir'], ub.app_DB_path):
return _db_configuration_result(_('DB Location is not Valid, Please Enter Correct Path'),
gdrive_error)
if not os.path.exists(metadata_db) or not to_save['config_calibre_dir']:
return _db_configuration_result(_('DB Location is not Valid, Please Enter Correct Path'), gdrive_error)
else:
calibre_db.setup_db(to_save['config_calibre_dir'], ub.app_DB_path)
config.store_calibre_uuid(calibre_db, db.Library_Id)
# if db changed -> delete shelfs, delete download books, delete read books, kobo sync...
if db_change: