mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
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:
parent
4ae2773dc9
commit
a6c1944df8
6 changed files with 194 additions and 34 deletions
|
@ -44,11 +44,12 @@ type DownloadClientSettings struct {
|
|||
}
|
||||
|
||||
type DownloadClientRules struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
MaxActiveDownloads int `json:"max_active_downloads"`
|
||||
IgnoreSlowTorrents bool `json:"ignore_slow_torrents"`
|
||||
DownloadSpeedThreshold int64 `json:"download_speed_threshold"`
|
||||
UploadSpeedThreshold int64 `json:"upload_speed_threshold"`
|
||||
Enabled bool `json:"enabled"`
|
||||
MaxActiveDownloads int `json:"max_active_downloads"`
|
||||
IgnoreSlowTorrents bool `json:"ignore_slow_torrents"`
|
||||
IgnoreSlowTorrentsCondition IgnoreSlowTorrentsCondition `json:"ignore_slow_torrents_condition,omitempty"`
|
||||
DownloadSpeedThreshold int64 `json:"download_speed_threshold"`
|
||||
UploadSpeedThreshold int64 `json:"upload_speed_threshold"`
|
||||
}
|
||||
|
||||
type BasicAuth struct {
|
||||
|
@ -57,6 +58,13 @@ type BasicAuth struct {
|
|||
Password string `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
type IgnoreSlowTorrentsCondition string
|
||||
|
||||
const (
|
||||
IgnoreSlowTorrentsModeAlways IgnoreSlowTorrentsCondition = "ALWAYS"
|
||||
IgnoreSlowTorrentsModeMaxReached IgnoreSlowTorrentsCondition = "MAX_DOWNLOADS_REACHED"
|
||||
)
|
||||
|
||||
type DownloadClientType string
|
||||
|
||||
const (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue