feat(downloadclients): qBit rules add speed threshold condition (#652)

* fix: qbit add rules min check

* feat(downloadclients): add check condition

* feat(downloadclient): return on rejection
This commit is contained in:
ze0s 2023-01-17 23:34:03 +01:00 committed by GitHub
parent 4ae2773dc9
commit a6c1944df8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 194 additions and 34 deletions

View file

@ -7,7 +7,7 @@ import { Form, Formik, useFormikContext } from "formik";
import DEBUG from "../../components/debug";
import { queryClient } from "../../App";
import { APIClient } from "../../api/APIClient";
import { DownloadClientTypeOptions } from "../../domain/constants";
import { DownloadClientTypeOptions, DownloadRuleConditionOptions } from "../../domain/constants";
import { toast } from "react-hot-toast";
import Toast from "../../components/notifications/Toast";
@ -21,6 +21,7 @@ import {
TextFieldWide
} from "../../components/inputs";
import DownloadClient from "../../screens/settings/DownloadClient";
import { SelectFieldWide } from "../../components/inputs/input_wide";
interface InitialValuesSettings {
basic?: {
@ -270,6 +271,12 @@ function FormFieldsRules() {
{settings.rules?.ignore_slow_torrents === true && (
<>
<SelectFieldWide
name="settings.rules.ignore_slow_torrents_condition"
label="Ignore condition"
optionDefaultText="Select ignore condition"
options={DownloadRuleConditionOptions}
/>
<NumberFieldWide
name="settings.rules.download_speed_threshold"
label="Download speed threshold"