Skip to content

Commit

Permalink
Fixed: (HDSpace) Auth failure and Name
Browse files Browse the repository at this point in the history
  • Loading branch information
Qstick committed Jun 29, 2021
1 parent 7a5721b commit fe8247d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/NzbDrone.Core/Indexers/Definitions/HDSpace.cs
Expand Up @@ -22,7 +22,7 @@ namespace NzbDrone.Core.Indexers.Definitions
{
public class HDSpace : TorrentIndexerBase<HDSpaceSettings>
{
public override string Name => "HDSpace";
public override string Name => "HD-Space";
public override string[] IndexerUrls => new string[] { "https://hd-space.org/" };
private string LoginUrl => Settings.BaseUrl + "index.php?page=login";
public override string Description => "Sharing The Universe";
Expand Down Expand Up @@ -53,7 +53,8 @@ protected override async Task DoLogin()

var requestBuilder = new HttpRequestBuilder(LoginUrl)
{
LogResponseContent = true
LogResponseContent = true,
AllowAutoRedirect = true
};

requestBuilder.Method = HttpMethod.POST;
Expand All @@ -68,6 +69,7 @@ protected override async Task DoLogin()
.AddFormParameter("pwd", Settings.Password)
.SetCookies(loginPage.GetCookies())
.SetHeader("Content-Type", "multipart/form-data")
.SetHeader("Referer", LoginUrl)
.Build();

var response = await ExecuteAuth(authLoginRequest);
Expand Down

0 comments on commit fe8247d

Please sign in to comment.