Skip to content

Commit

Permalink
Fixed: Not using correct BaseUrl if changed between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Qstick committed Jun 27, 2021
1 parent 38c0927 commit af13d6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/NzbDrone.Core/Indexers/Definitions/Cardigann/Cardigann.cs
Expand Up @@ -46,6 +46,8 @@ public override IIndexerRequestGenerator GetRequestGenerator()

generator = (CardigannRequestGenerator)SetCookieFunctions(generator);

generator.Settings = Settings;

_generatorCache.ClearExpired();

return generator;
Expand Down Expand Up @@ -136,11 +138,6 @@ private IndexerDefinition GetDefinition(CardigannMetaDefinition definition)

protected override bool CheckIfLoginNeeded(HttpResponse httpResponse)
{
if (httpResponse.HasHttpError)
{
return true;
}

var generator = (CardigannRequestGenerator)GetRequestGenerator();

SetCookieFunctions(generator);
Expand Down
Expand Up @@ -798,6 +798,11 @@ public bool CheckIfLoginIsNeeded(HttpResponse response)
return false;
}

if (response.HasHttpError)
{
return true;
}

var parser = new HtmlParser();
var document = parser.ParseDocument(response.Content);

Expand Down

0 comments on commit af13d6e

Please sign in to comment.