mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(filters): implement AnnounceType
(#1837)
* feat(filters): implement AnnounceType * fix: rss tests
This commit is contained in:
parent
ec85d53d8f
commit
f644b3a4d6
12 changed files with 155 additions and 17 deletions
|
@ -5,6 +5,29 @@
|
|||
|
||||
import { MultiSelectOption } from "@components/inputs/select";
|
||||
|
||||
export const AnnounceTypeOptions: MultiSelectOption[] = [
|
||||
{
|
||||
label: "New",
|
||||
value: "NEW"
|
||||
},
|
||||
{
|
||||
label: "Checked",
|
||||
value: "CHECKED"
|
||||
},
|
||||
{
|
||||
label: "Promo",
|
||||
value: "PROMO"
|
||||
},
|
||||
{
|
||||
label: "Promo GP",
|
||||
value: "PROMO_GP"
|
||||
},
|
||||
{
|
||||
label: "Resurrected",
|
||||
value: "RESURRECTED"
|
||||
}
|
||||
];
|
||||
|
||||
export const resolutions = [
|
||||
"2160p",
|
||||
"1080p",
|
||||
|
|
|
@ -392,6 +392,7 @@ export const FilterDetails = () => {
|
|||
enabled: filter.enabled,
|
||||
min_size: filter.min_size,
|
||||
max_size: filter.max_size,
|
||||
announce_types: filter.announce_types || [],
|
||||
delay: filter.delay,
|
||||
priority: filter.priority,
|
||||
max_downloads: filter.max_downloads,
|
||||
|
|
|
@ -10,7 +10,16 @@ import { IndexersOptionsQueryOptions } from "@api/queries";
|
|||
|
||||
import { DocsLink } from "@components/ExternalLink";
|
||||
import { FilterLayout, FilterPage, FilterSection } from "./_components";
|
||||
import { IndexerMultiSelect, MultiSelectOption, NumberField, Select, SwitchGroup, TextField } from "@components/inputs";
|
||||
import {
|
||||
IndexerMultiSelect,
|
||||
MultiSelect,
|
||||
MultiSelectOption,
|
||||
NumberField,
|
||||
Select,
|
||||
SwitchGroup,
|
||||
TextField
|
||||
} from "@components/inputs";
|
||||
import * as CONSTS from "@domain/constants.ts";
|
||||
|
||||
|
||||
const MapIndexer = (indexer: Indexer) => (
|
||||
|
@ -29,9 +38,20 @@ export const General = () => {
|
|||
<FilterLayout>
|
||||
<TextField name="name" label="Filter name" columns={6} placeholder="eg. Filter 1" />
|
||||
|
||||
{/*{!isLoading && (*/}
|
||||
<IndexerMultiSelect name="indexers" options={indexerOptions} label="Indexers" columns={6} />
|
||||
{/*)}*/}
|
||||
<MultiSelect
|
||||
name="announce_types"
|
||||
options={CONSTS.AnnounceTypeOptions}
|
||||
label="announce types"
|
||||
columns={3}
|
||||
tooltip={
|
||||
<div>
|
||||
<p>NEW! Match releases which contain any of the selected announce types.</p>
|
||||
<DocsLink href="https://autobrr.com/filters#announce-type" />
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
|
||||
<IndexerMultiSelect name="indexers" options={indexerOptions} label="Indexers" columns={3} />
|
||||
</FilterLayout>
|
||||
</FilterSection>
|
||||
|
||||
|
|
1
web/src/types/Filter.d.ts
vendored
1
web/src/types/Filter.d.ts
vendored
|
@ -13,6 +13,7 @@ interface Filter {
|
|||
max_size: string;
|
||||
delay: number;
|
||||
priority: number;
|
||||
announce_types: string[];
|
||||
max_downloads: number;
|
||||
max_downloads_unit: string;
|
||||
match_releases: string;
|
||||
|
|
1
web/src/types/Release.d.ts
vendored
1
web/src/types/Release.d.ts
vendored
|
@ -11,6 +11,7 @@ interface Release {
|
|||
filter: string;
|
||||
protocol: string;
|
||||
implementation: string;
|
||||
announce_type: string;
|
||||
name: string;
|
||||
title: string;
|
||||
size: number;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue