From 63021bd3139318419497fe00fd6efbcca686b81d Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 29 Apr 2023 16:54:54 +0700 Subject: [PATCH] add autostart subs to config form --- tubearchivist/home/src/frontend/forms.py | 9 +++++++++ tubearchivist/home/templates/home/settings.html | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/tubearchivist/home/src/frontend/forms.py b/tubearchivist/home/src/frontend/forms.py index a643fb8..19b3058 100644 --- a/tubearchivist/home/src/frontend/forms.py +++ b/tubearchivist/home/src/frontend/forms.py @@ -44,6 +44,12 @@ class UserSettingsForm(forms.Form): class ApplicationSettingsForm(forms.Form): """handle all application settings""" + AUTOSTART_CHOICES = [ + ("", "-- change subscription autostart --"), + ("0", "disable auto start"), + ("1", "enable auto start"), + ] + METADATA_CHOICES = [ ("", "-- change metadata embed --"), ("0", "don't embed metadata"), @@ -107,6 +113,9 @@ class ApplicationSettingsForm(forms.Form): subscriptions_shorts_channel_size = forms.IntegerField( required=False, min_value=0 ) + subscriptions_auto_start = forms.ChoiceField( + widget=forms.Select, choices=AUTOSTART_CHOICES, required=False + ) downloads_limit_speed = forms.IntegerField(required=False) downloads_throttledratelimit = forms.IntegerField(required=False) downloads_sleep_interval = forms.IntegerField(required=False) diff --git a/tubearchivist/home/templates/home/settings.html b/tubearchivist/home/templates/home/settings.html index 55ea208..e739fde 100644 --- a/tubearchivist/home/templates/home/settings.html +++ b/tubearchivist/home/templates/home/settings.html @@ -49,6 +49,11 @@ Shorts Videos to scan to find new items for the Rescan subscriptions task, max recommended 50.
{{ app_form.subscriptions_shorts_channel_size }} +
+

Auto start download from your subscriptions: {{ config.subscriptions.auto_start}}

+ Enable this will automatically start and prioritize videos from your subscriptions.
+ {{ app_form.subscriptions_auto_start }} +

Downloads