mirror of
https://github.com/Radarr/Radarr
synced 2026-05-07 19:31:20 +02:00
Fixed: Login with credentials on Qbittorrent 5.2
This commit is contained in:
parent
8ac3e4746a
commit
b028efbe3e
1 changed files with 5 additions and 5 deletions
|
|
@ -412,13 +412,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
|
||||
|
|
@ -428,6 +427,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue