From 40c7a6a3f7100713598cbc2ae66f060bbd750a71 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 2 Dec 2021 18:38:32 +0700 Subject: [PATCH] initial scheduler_form for settings --- tubearchivist/home/forms.py | 10 ++++++ .../home/templates/home/settings.html | 34 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/tubearchivist/home/forms.py b/tubearchivist/home/forms.py index 5661025..86f608e 100644 --- a/tubearchivist/home/forms.py +++ b/tubearchivist/home/forms.py @@ -62,6 +62,16 @@ class ApplicationSettingsForm(forms.Form): ) +class SchedulerSettingsForm(forms.Form): + """handle scheduler settings""" + + update_subscribed = forms.CharField(required=False) + download_pending = forms.CharField(required=False) + check_reindex = forms.CharField(required=False) + thumbnail_check = forms.CharField(required=False) + run_backup = forms.CharField(required=False) + + class VideoSearchForm(forms.Form): """search videos form""" diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index 31be996..0603bdb 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -101,6 +101,40 @@ +
+

Scheduler setup

+
+
+ {% csrf_token %} +
+
+

Rescan Subscriptions

+

Periodically rescan your subscriptions.

+ {{ scheduler_form.update_subscribed }} +
+
+

Start download

+

Periodically download videos.

+ {{ scheduler_form.download_pending }} +
+
+

Refresh Metadata

+

Periodically refresh metadata from YouTube.

+ {{ scheduler_form.check_reindex }} +
+
+

Thumbnail check

+

Periodically check and cleanup thumbnails.

+ {{ scheduler_form.thumbnail_check }} +
+
+

Index backup

+

Periodically backup metadata.

+ {{ scheduler_form.run_backup }} +
+
+ +

Actions