()
| 1 | def load(): |
| 2 | from app.plugins.functions import get_current_plugin |
| 3 | plugin = get_current_plugin(only_active=True) |
| 4 | data_store = plugin.get_global_data_store() |
| 5 | |
| 6 | smtp_configuration = { |
| 7 | 'smtp_server': data_store.get_string('smtp_server', default=""), |
| 8 | 'smtp_port': data_store.get_int('smtp_port', default=587), |
| 9 | 'smtp_username': data_store.get_string('smtp_username', default=""), |
| 10 | 'smtp_password': data_store.get_string('smtp_password', default=""), |
| 11 | 'smtp_use_tls': data_store.get_bool('smtp_use_tls', default=False), |
| 12 | 'smtp_from_address': data_store.get_string('smtp_from_address', default=""), |
| 13 | 'smtp_to_address': data_store.get_string('smtp_to_address', default=""), |
| 14 | 'notification_app_name': data_store.get_string('notification_app_name', default=""), |
| 15 | 'notify_task_completed': data_store.get_bool('notify_task_completed', default=False), |
| 16 | 'notify_task_failed': data_store.get_bool('notify_task_failed', default=False), |
| 17 | 'notify_task_removed': data_store.get_bool('notify_task_removed', default=False) |
| 18 | } |
| 19 | return smtp_configuration |
| 20 | |
| 21 | |
| 22 | def save(data: dict): |
nothing calls this directly
no test coverage detected