From 80c25301169e6dc17ecf52e0f2881606b47759b8 Mon Sep 17 00:00:00 2001 From: soup Date: Sun, 17 Dec 2023 22:46:44 +0100 Subject: [PATCH] fix(actions): qBit handle `Ignore slow torrents` rule correctly when disabled (#1309) * fix(qbittorrent): handle 'Ignore slow torrents' rule correctly when disabled * move IgnoreSlowTorrents bool check --- internal/action/qbittorrent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/action/qbittorrent.go b/internal/action/qbittorrent.go index 27330cb..86fef8d 100644 --- a/internal/action/qbittorrent.go +++ b/internal/action/qbittorrent.go @@ -167,7 +167,7 @@ func (s *service) qbittorrentCheckRulesCanDownload(ctx context.Context, action * return []string{rejection}, nil } - if rules.IgnoreSlowTorrentsCondition == domain.IgnoreSlowTorrentsModeMaxReached { + if rules.IgnoreSlowTorrents && rules.IgnoreSlowTorrentsCondition == domain.IgnoreSlowTorrentsModeMaxReached { // get transfer info info, err := qbt.GetTransferInfoCtx(ctx) if err != nil { @@ -189,7 +189,7 @@ func (s *service) qbittorrentCheckRulesCanDownload(ctx context.Context, action * } // if max active downloads is unlimited or not reached, lets check if ignore slow always should be checked - if rules.IgnoreSlowTorrentsCondition == domain.IgnoreSlowTorrentsModeAlways { + if rules.IgnoreSlowTorrents && rules.IgnoreSlowTorrentsCondition == domain.IgnoreSlowTorrentsModeAlways { // get transfer info info, err := qbt.GetTransferInfoCtx(ctx) if err != nil {