feat(actions): qBittorrent add priority handling (#1315)

* feat(qbittorrent): add priority handling

* fix: check if torrent queueing is enabled

* fix: only check for torrent queueing if priority is set

* fix: improve tooltip message

* feat: enable torrent queueing if disabled

* change to SetPreferencesQueueingEnabled

* feat(actions): rename field

* chore: bump pkg go-qbittorrent to v1.8.0

* chore(deps): update go-qbittorrent to v1.8.1

* chore(deps): go mod tidy

---------

Co-authored-by: ze0s <ze0s@riseup.net>
This commit is contained in:
soup 2023-12-25 22:39:31 +01:00 committed by GitHub
parent 0ab404f81a
commit c6122dbc41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 115 additions and 30 deletions

View file

@ -54,6 +54,7 @@ export function Actions({ filter, values }: FilterActionsProps) {
ignore_rules: false,
skip_hash_check: false,
content_layout: "" || undefined,
priority: "" || undefined,
limit_upload_speed: 0,
limit_download_speed: 0,
limit_ratio: 0,

View file

@ -1,7 +1,7 @@
import { Link } from "react-router-dom";
import { DocsLink } from "@components/ExternalLink";
import { ActionContentLayoutOptions } from "@domain/constants";
import { ActionContentLayoutOptions, ActionPriorityOptions } from "@domain/constants";
import * as Input from "@components/inputs";
import { CollapsibleSection } from "../_components";
@ -105,6 +105,19 @@ export const QBittorrent = ({ idx, action, clients }: ClientActionProps) => (
description="Add torrent and skip hash check"
/>
</FilterSection.HalfRow>
<FilterSection.HalfRow>
<Input.Select
name={`actions.${idx}.priority`}
label="Priority"
optionDefaultText="Disabled"
options={ActionPriorityOptions}
tooltip={
<div>
<p>Torrent Queueing will be enabled for you if it is disabled. Ensure you set your preferred limits for it in your client.</p>
</div>
}
/>
</FilterSection.HalfRow>
</CollapsibleSection>
<CollapsibleSection