From fdc07a47b169e45a57bb88c72741c02d14f4a9c8 Mon Sep 17 00:00:00 2001 From: Polgonite <84715604+Polgonite@users.noreply.github.com> Date: Wed, 22 Oct 2025 06:05:53 +0200 Subject: [PATCH] Fixed: qBittorrent /login API success check --- .../Download/Clients/QBittorrent/QBittorrentProxyV2.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs index 07e65acd9..379fc930e 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs @@ -425,8 +425,8 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent } catch (HttpException ex) { - _logger.Debug("qbitTorrent authentication failed."); - if (ex.Response.StatusCode == HttpStatusCode.Forbidden) + _logger.Debug(ex, "qbitTorrent authentication failed."); + if (ex.Response.StatusCode is HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden) { throw new DownloadClientAuthenticationException("Failed to authenticate with qBittorrent.", ex); } @@ -438,7 +438,7 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent throw new DownloadClientUnavailableException("Failed to connect to qBittorrent, please check your settings.", ex); } - if (response.Content != "Ok.") + if (response.Content.IsNotNullOrWhiteSpace() && response.Content != "Ok.") { // returns "Fails." on bad login _logger.Debug("qbitTorrent authentication failed.");