mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(lists): add option to skip cleaning of Plaintext data (#2036)
* Added: Plaintext untouched * Revert "Added: Plaintext untouched" This reverts commit e6ceaec5f4776cfc8335ae2c02e1caa4a2bbb0bc. * Added: skipCleanSanitize * TS definition for List object doesn't yet know about the new skip_clean_sanitize property * Update: ListForms.tsx with the bypass option * Update: Database internals for skip_clean_sanitize * Fix: Snake case
This commit is contained in:
parent
9caf7807de
commit
4ce2241991
7 changed files with 49 additions and 12 deletions
|
@ -142,6 +142,7 @@ export function ListAddForm({ isOpen, toggle }: AddFormProps) {
|
|||
tags_excluded: [],
|
||||
include_unmonitored: false,
|
||||
include_alternate_titles: false,
|
||||
skip_clean_sanitize: false,
|
||||
}}
|
||||
onSubmit={onSubmit}
|
||||
validate={validate}
|
||||
|
@ -373,6 +374,7 @@ export function ListUpdateForm({ isOpen, toggle, data }: UpdateFormProps<List>)
|
|||
tags_excluded: data.tags_excluded,
|
||||
include_unmonitored: data.include_unmonitored,
|
||||
include_alternate_titles: data.include_alternate_titles,
|
||||
skip_clean_sanitize: data.skip_clean_sanitize,
|
||||
}}
|
||||
onSubmit={onSubmit}
|
||||
// validate={validate}
|
||||
|
@ -597,6 +599,13 @@ const FilterOptionCheckBoxes = (props: ListTypeFormProps) => {
|
|||
<SwitchGroupWide name="include_unmonitored" label="Include Unmonitored" description="By default only monitored titles are filtered." />
|
||||
</fieldset>
|
||||
);
|
||||
case "PLAINTEXT":
|
||||
return (
|
||||
<fieldset>
|
||||
<legend className="sr-only">Settings</legend>
|
||||
<SwitchGroupWide name="skip_clean_sanitize" label="Bypass the cleanup and sanitization and use the list as-is" description="By default, titles are automatically sanitized and checked for unusual characters." />
|
||||
</fieldset>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,6 +757,12 @@ function ListTypePlainText() {
|
|||
<SwitchGroupWide name="match_release" label="Match Release" description="Use Match Releases field. Uses Movies/Shows field by default." />
|
||||
</fieldset>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<fieldset>
|
||||
<legend className="sr-only">Settings</legend>
|
||||
<SwitchGroupWide name="skip_clean_sanitize" label="Bypass the cleanup and sanitization and use the list as-is" description="By default, titles are automatically sanitized and checked for unusual characters." />
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
2
web/src/types/List.d.ts
vendored
2
web/src/types/List.d.ts
vendored
|
@ -18,6 +18,7 @@ interface List {
|
|||
tags_excluded: string[];
|
||||
include_unmonitored: boolean;
|
||||
include_alternate_titles: boolean;
|
||||
skip_clean_sanitize: boolean;
|
||||
}
|
||||
|
||||
interface ListFilter {
|
||||
|
@ -39,6 +40,7 @@ interface ListCreate {
|
|||
tags_exclude: string[];
|
||||
include_unmonitored: boolean;
|
||||
include_alternate_titles: boolean;
|
||||
skip_clean_sanitize: boolean;
|
||||
}
|
||||
|
||||
type ListType =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue