feat(filters): support Language filtering (#632)

* feat(filters): add support for language

* feat(filters): add db migrations and repo

* feat(filters): fix failing tests

* feat(filters): fix failing tests
This commit is contained in:
ze0s 2023-01-09 00:33:08 +01:00 committed by GitHub
parent 3c4711efa0
commit 5c402b6d6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 120 additions and 8 deletions

View file

@ -11,6 +11,7 @@ import {
downloadsPerUnitOptions,
FORMATS_OPTIONS,
HDR_OPTIONS,
LANGUAGE_OPTIONS,
ORIGIN_OPTIONS,
OTHER_OPTIONS,
QUALITY_MUSIC_OPTIONS,
@ -265,6 +266,8 @@ export default function FilterDetails() {
except_tags: filter.except_tags,
match_uploaders: filter.match_uploaders,
except_uploaders: filter.except_uploaders,
match_language: filter.match_language || [],
except_language: filter.except_language || [],
freeleech: filter.freeleech,
freeleech_percent: filter.freeleech_percent,
formats: filter.formats || [],
@ -516,6 +519,11 @@ export function Advanced({ values }: AdvancedProps) {
<TextField name="except_uploaders" label="Except uploaders" columns={6} placeholder="eg. anonymous" />
</CollapsableSection>
<CollapsableSection defaultOpen={true} title="Language" subtitle="Match or ignore languages.">
<MultiSelect name="match_language" options={LANGUAGE_OPTIONS} label="Match Language" columns={6} creatable={true} />
<MultiSelect name="except_language" options={LANGUAGE_OPTIONS} label="Except Language" columns={6} creatable={true} />
</CollapsableSection>
<CollapsableSection defaultOpen={true} title="Origins" subtitle="Match Internals, scene, p2p etc. if announced.">
<MultiSelect name="origins" options={ORIGIN_OPTIONS} label="Match Origins" columns={6} creatable={true} />
<MultiSelect name="except_origins" options={ORIGIN_OPTIONS} label="Except Origins" columns={6} creatable={true} />