diff --git a/tubearchivist/home/config.json b/tubearchivist/home/config.json index 6b1b5d2..def21ec 100644 --- a/tubearchivist/home/config.json +++ b/tubearchivist/home/config.json @@ -33,8 +33,10 @@ "scheduler": { "update_subscribed": false, "download_pending": false, - "check_reindex": false, - "thumbnail_check": false, - "run_backup": false + "check_reindex": {"minute": "0", "hour": "12", "day_of_week": "*"}, + "check_reindex_days": 90, + "thumbnail_check": {"minute": "0", "hour": "17", "day_of_week": "*"}, + "run_backup": {"minute": "0", "hour": "8", "day_of_week": "0"}, + "run_backup_rotate": 5 } } diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index bc75534..634bfda 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -36,14 +36,6 @@ Recent videos for channels and playlist to check when running Rescan subscriptions, max recommended 50.
{{ app_form.subscriptions_channel_size }} -
-

Auto scan subscribed channels:

- Coming soon -
-
-

Auto download pending:

- Coming soon -

Downloads

@@ -67,10 +59,6 @@ Seconds to sleep between calls to YouTube. Might be necessary to avoid throttling. Recommended 3.
{{ app_form.downloads_sleep_interval }}
-
-

External downloader:

- Coming soon -

Download Format

@@ -103,36 +91,113 @@
-

Scheduler setup

+

Scheduler Setup

+
+

Schedule settings expect a cron like format, where the first value is minute, second is hour and third is day of the week.

+

Examples:

+
    +
  • 0 15 *: Run task every day at 15:00 in the afternoon.
  • +
  • 30 8 */2: Run task every second day of the week (Sun, Tue, Thu, Sat) at 08:30 in the morning.
  • +
  • 0: (zero), deactivate that task.
  • +
+

Note:

+
    +
  • Changes in the scheduler settings require a container restart to take effect.
  • +
  • Avoid an unnecessary frequent schedule to not get blocked by YouTube. For that reason * or wildcard for minutes is not supported.
  • +
+
{% csrf_token %}
+

Rescan Subscriptions

-

Rescan Subscriptions

-

Periodically rescan your subscriptions.

+

Current rescan schedule: + {% if config.scheduler.update_subscribed %} + {% for key, value in config.scheduler.update_subscribed.items %} + {{ value }} + {% endfor %} + {% else %} + False + {% endif %} +

+

Periodically rescan your subscriptions:

{{ scheduler_form.update_subscribed }}
+
+
+

Start download

-

Start download

-

Periodically download videos.

+

Current Download schedule: + {% if config.scheduler.download_pending %} + {% for key, value in config.scheduler.download_pending.items %} + {{ value }} + {% endfor %} + {% else %} + False + {% endif %} +

+

Automatic video download schedule:

{{ scheduler_form.download_pending }}
+
+
+

Refresh Metadata

-

Refresh Metadata

-

Periodically refresh metadata from YouTube.

+

Current Metadata refresh schedule: + {% if config.scheduler.check_reindex %} + {% for key, value in config.scheduler.check_reindex.items %} + {{ value }} + {% endfor %} + {% else %} + False + {% endif %} +

+

Daily schedule to refresh metadata from YouTube:

{{ scheduler_form.check_reindex }}
-

Thumbnail check

-

Periodically check and cleanup thumbnails.

+

Current refresh for metadata older than, in days: {{ config.scheduler.check_reindex_days }}

+

Refresh videos older than, in days:

+ {{ scheduler_form.check_reindex_days }} +
+
+
+

Thumbnail check

+
+

Current thumbnail check schedule: + {% if config.scheduler.thumbnail_check %} + {% for key, value in config.scheduler.thumbnail_check.items %} + {{ value }} + {% endfor %} + {% else %} + False + {% endif %} +

+

Periodically check and cleanup thumbnails:

{{ scheduler_form.thumbnail_check }}
+
+
+

Index backup

-

Index backup

-

Periodically backup metadata.

+

Current index backup schedule: + {% if config.scheduler.run_backup %} + {% for key, value in config.scheduler.run_backup.items %} + {{ value }} + {% endfor %} + {% else %} + False + {% endif %} +

+

Automatically backup metadata to a zip file:

{{ scheduler_form.run_backup }}
+
+

Current backup files to keep: {{ config.scheduler.run_backup_rotate }}

+

Max auto backups to keep:

+ {{ scheduler_form.run_backup_rotate }} +