mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 09:02:44 +08:00
Added UI to choose which providers to exclude from sync process.
This commit is contained in:
parent
756bd90ceb
commit
dbfd577a2d
3 changed files with 24 additions and 2 deletions
|
@ -402,7 +402,9 @@ array_keys = ['excluded_tags',
|
|||
'enabled_providers',
|
||||
'path_mappings',
|
||||
'path_mappings_movie',
|
||||
'language_equals']
|
||||
'language_equals',
|
||||
'blacklisted_languages',
|
||||
'blacklisted_providers']
|
||||
|
||||
empty_values = ['', 'None', 'null', 'undefined', None, []]
|
||||
|
||||
|
@ -630,7 +632,10 @@ def save_settings(settings_items):
|
|||
reset_throttled_providers(only_auth_or_conf_error=True)
|
||||
|
||||
if settings_keys[0] == 'settings':
|
||||
if len(settings_keys) == 3:
|
||||
settings[settings_keys[1]][settings_keys[2]] = value
|
||||
elif len(settings_keys) == 4:
|
||||
settings[settings_keys[1]][settings_keys[2]][settings_keys[3]] = value
|
||||
|
||||
if settings_keys[0] == 'subzero':
|
||||
mod = settings_keys[1]
|
||||
|
|
|
@ -5,6 +5,7 @@ import {
|
|||
CollapseBox,
|
||||
Layout,
|
||||
Message,
|
||||
MultiSelector,
|
||||
Password,
|
||||
Section,
|
||||
Selector,
|
||||
|
@ -23,6 +24,7 @@ import {
|
|||
embeddedSubtitlesParserOption,
|
||||
folderOptions,
|
||||
hiExtensionOptions,
|
||||
providerOptions,
|
||||
} from "./options";
|
||||
|
||||
interface CommandOption {
|
||||
|
@ -405,6 +407,13 @@ const SettingsSubtitlesView: FunctionComponent = () => {
|
|||
subtitles.
|
||||
</Message>
|
||||
<CollapseBox indent settingKey="settings-subsync-use_subsync">
|
||||
<MultiSelector
|
||||
placeholder="Select providers..."
|
||||
label="Do not sync subtitles downloaded from those providers"
|
||||
clearable
|
||||
options={providerOptions}
|
||||
settingKey="settings-subsync-checker-blacklisted_providers"
|
||||
></MultiSelector>
|
||||
<Check label="Debug" settingKey="settings-subsync-debug"></Check>
|
||||
<Message>
|
||||
Do not actually sync the subtitles but generate a .tar.gz file to be
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { SelectorOption } from "@/components";
|
||||
import { ProviderList } from "../Providers/list";
|
||||
|
||||
export const hiExtensionOptions: SelectorOption<string>[] = [
|
||||
{
|
||||
|
@ -165,3 +166,10 @@ export const colorOptions: SelectorOption<string>[] = [
|
|||
value: buildColor("dark-grey"),
|
||||
},
|
||||
];
|
||||
|
||||
export const providerOptions: SelectorOption<string>[] = ProviderList.map(
|
||||
(v) => ({
|
||||
label: v.key,
|
||||
value: v.key,
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue