From 873a8256b6b198f926a720f9a58b512cda4cf47d Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 2 Jan 2026 13:26:18 +0200 Subject: [PATCH] Fixed: Login with credentials on Qbittorrent 5.2 --- .../Download/Clients/QBittorrent/QBittorrentProxyV2.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs index 2ab3724fd..bcebe0b98 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs @@ -413,13 +413,12 @@ private void AuthenticateClient(HttpRequestBuilder requestBuilder, QBittorrentSe _authCookieCache.Remove(authKey); var authRequestBuilder = BuildRequest(settings); - authRequestBuilder.NetworkCredential = new BasicNetworkCredential(settings.Username, settings.Password); var authLoginRequest = authRequestBuilder.Resource("/api/v2/auth/login") - .Post() - .AddFormParameter("username", settings.Username ?? string.Empty) - .AddFormParameter("password", settings.Password ?? string.Empty) - .Build(); + .Post() + .AddFormParameter("username", settings.Username ?? string.Empty) + .AddFormParameter("password", settings.Password ?? string.Empty) + .Build(); HttpResponse response; try @@ -429,6 +428,7 @@ private void AuthenticateClient(HttpRequestBuilder requestBuilder, QBittorrentSe catch (HttpException ex) { _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);