initial scheduler_form for settings

This commit is contained in:
simon 2021-12-02 18:38:32 +07:00
parent b2861e0369
commit 40c7a6a3f7
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
2 changed files with 44 additions and 0 deletions

View File

@ -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"""

View File

@ -101,6 +101,40 @@
</div>
<button type="submit" name="application-settings">Update Application Configurations</button>
</form>
<div class="title-bar">
<h1>Scheduler setup</h1>
</div>
<form action="/settings/" method="POST" name="scheduler-update">
{% csrf_token %}
<div class="settings-group">
<div class="settings-item">
<h2>Rescan Subscriptions</h2>
<p>Periodically rescan your subscriptions.</p>
{{ scheduler_form.update_subscribed }}
</div>
<div class="settings-item">
<h2>Start download</h2>
<p>Periodically download videos.</p>
{{ scheduler_form.download_pending }}
</div>
<div class="settings-item">
<h2>Refresh Metadata</h2>
<p>Periodically refresh metadata from YouTube.</p>
{{ scheduler_form.check_reindex }}
</div>
<div class="settings-item">
<h2>Thumbnail check</h2>
<p>Periodically check and cleanup thumbnails.</p>
{{ scheduler_form.thumbnail_check }}
</div>
<div class="settings-item">
<h2>Index backup</h2>
<p>Periodically backup metadata.</p>
{{ scheduler_form.run_backup }}
</div>
</div>
<button type="submit" name="scheduler-settings">Update Scheduler Settings</button>
</form>
<div class="title-bar">
<h1>Actions</h1>
</div>