add frontend subtitle dl settings

This commit is contained in:
simon 2022-01-30 20:10:29 +07:00
parent e5e83287ab
commit 365a2bf59f
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
3 changed files with 23 additions and 0 deletions

View File

@ -23,6 +23,8 @@
"format": false,
"add_metadata": false,
"add_thumbnail": false,
"subtitle": false,
"subtitle_source": false,
"throttledratelimit": false,
"integrate_ryd": false
},

View File

@ -68,6 +68,12 @@ class ApplicationSettingsForm(forms.Form):
("1", "enable Cast"),
]
SUBTITLE_SOURCE_CHOICES = [
("", "-- change subtitle source settings"),
("auto", "also download auto generated"),
("user", "only download uploader"),
]
subscriptions_channel_size = forms.IntegerField(required=False)
downloads_limit_count = forms.IntegerField(required=False)
downloads_limit_speed = forms.IntegerField(required=False)
@ -81,6 +87,10 @@ class ApplicationSettingsForm(forms.Form):
downloads_add_thumbnail = forms.ChoiceField(
widget=forms.Select, choices=THUMBNAIL_CHOICES, required=False
)
downloads_subtitle = forms.CharField(required=False)
downloads_subtitle_source = forms.ChoiceField(
widget=forms.Select, choices=SUBTITLE_SOURCE_CHOICES, required=False
)
downloads_integrate_ryd = forms.ChoiceField(
widget=forms.Select, choices=RYD_CHOICES, required=False
)

View File

@ -94,6 +94,17 @@
<i>Embed thumbnail into the mediafile.</i><br>
{{ app_form.downloads_add_thumbnail }}
</div>
<div class="settings-item">
<p>Subtitles download setting: <span class="settings-current">{{ config.downloads.subtitle }}</span><br>
<i>Choose which subtitles to download, add comma separated two letter language ISO code,<br>
e.g. <span class="settings-current">en, de</span></i><br>
{{ app_form.downloads_subtitle }}</p>
</div>
<div class="settings-item">
<p>Subtitle source settings: <span class="settings-current">{{ config.downloads.subtitle_source }}</span></p>
<i>Download only user generated, or also less accurate auto generated subtitles.</i><br>
{{ app_form.downloads_subtitle_source }}
</div>
</div>
<div class="settings-group">
<h2 id="integrations">Integrations</h2>