feat(downloadclient): set downloadClientId for arr clients (#1081)

feat(downloadclient): arrs set downloadClientId
This commit is contained in:
ze0s 2023-09-03 15:34:55 +02:00 committed by GitHub
parent 1bfbe38335
commit 0d3e10f094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 154 additions and 66 deletions

View file

@ -116,6 +116,8 @@ function FormFieldsArr() {
<PasswordFieldWide name="settings.basic.password" label="Password" />
</>
)}
<NumberFieldWide name="settings.external_download_client_id" label="Download Client ID" tooltip={<div><p>Specify what client the arr should use by default. Can be overridden per filter action. You can find the id in the arr by looking at the network responses for download clients.</p></div>} />
</div>
);
}

View file

@ -71,6 +71,7 @@ export function FilterActions({ filter, values }: FilterActionsProps) {
webhook_method: "",
webhook_data: "",
webhook_headers: [],
external_download_client_id: 0,
client_id: 0
};
@ -542,6 +543,11 @@ const TypeForm = ({ action, idx, clients }: TypeFormProps) => {
action={action}
clients={clients}
/>
<NumberField
name={`actions.${idx}.external_download_client_id`}
label="Override download client id for arr"
tooltip={<p>Override Download client Id from the one set in Clients. Useful if you have multiple clients inside the arr.</p>}
/>
</div>
);
case "SABNZBD":

View file

@ -45,6 +45,7 @@ interface DownloadClientSettings {
apikey?: string;
basic?: DownloadClientBasicAuth;
rules?: DownloadClientRules;
external_download_client_id?: number;
}
interface DownloadClient {

View file

@ -102,8 +102,9 @@ interface Action {
webhook_method: string;
webhook_data: string,
webhook_headers: string[];
filter_id?: number;
external_download_client_id?: number;
client_id?: number;
filter_id?: number;
}
type ActionContentLayout = "ORIGINAL" | "SUBFOLDER_CREATE" | "SUBFOLDER_NONE";