diff --git a/cps/admin.py b/cps/admin.py index 610afa17..b24c9508 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1358,6 +1358,7 @@ def update_scheduledtasks(): error = True _config_checkbox(to_save, "schedule_generate_book_covers") _config_checkbox(to_save, "schedule_generate_series_covers") + _config_checkbox(to_save, "schedule_metadata_backup") _config_checkbox(to_save, "schedule_reconnect") if not error: diff --git a/cps/config_sql.py b/cps/config_sql.py index 771b353c..f4ac88fd 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -153,6 +153,7 @@ class _Settings(_Base): schedule_generate_book_covers = Column(Boolean, default=False) schedule_generate_series_covers = Column(Boolean, default=False) schedule_reconnect = Column(Boolean, default=False) + schedule_metadata_backup = Column(Boolean, default=False) config_password_policy = Column(Boolean, default=True) config_password_min_length = Column(Integer, default=8) diff --git a/cps/schedule.py b/cps/schedule.py index cab8d7d3..05367e99 100644 --- a/cps/schedule.py +++ b/cps/schedule.py @@ -31,8 +31,8 @@ def get_scheduled_tasks(reconnect=True): if reconnect: tasks.append([lambda: TaskReconnectDatabase(), 'reconnect', False]) - # ToDo make configurable. Generate metadata.opf file for each changed book - if True: + # Generate metadata.opf file for each changed book + if config.schedule_metadata_backup: tasks.append([lambda: TaskBackupMetadata("en"), 'backup metadata', False]) # Generate all missing book cover thumbnails diff --git a/cps/templates/admin.html b/cps/templates/admin.html index 9460fa83..ac124fe8 100644 --- a/cps/templates/admin.html +++ b/cps/templates/admin.html @@ -186,6 +186,10 @@