Fixed: Set Token for PHD after re-auth

This commit is contained in:
Qstick
2021-03-20 01:36:38 -04:00
parent 31b13345c7
commit acbb6e3549
4 changed files with 21 additions and 14 deletions
@@ -77,6 +77,12 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
return false;
}
protected override void ModifyRequest(IndexerRequest request)
{
request.HttpRequest.Headers.Set("Authorization", $"Bearer {Settings.Token}");
base.ModifyRequest(request);
}
protected override async Task<ValidationFailure> TestConnection()
{
try
@@ -25,7 +25,7 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
public int Seed { get; set; }
[JsonProperty(PropertyName = "file_size")]
public int FileSize { get; set; }
public long FileSize { get; set; }
[JsonProperty(PropertyName = "file_count")]
public int FileCount { get; set; }
@@ -47,11 +47,6 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
}
var jsonResponse = new HttpResponse<AvistazResponse>(indexerResponse.HttpResponse);
if (jsonResponse.Resource.Status != "success" ||
jsonResponse.Resource.Status.IsNullOrWhiteSpace())
{
return torrentInfos;
}
foreach (var row in jsonResponse.Resource.Data)
{