Logout content when no results are parsed from Indexer

pull/8/head
Qstick 4 years ago
parent e2ef1e850c
commit d9defe505c

@ -365,9 +365,16 @@ namespace NzbDrone.Core.Indexers
try try
{ {
var releases = parser.ParseResponse(response).ToList();
if (releases.Count == 0)
{
_logger.Trace(response.Content);
}
return new IndexerQueryResult return new IndexerQueryResult
{ {
Releases = parser.ParseResponse(response).ToList(), Releases = releases,
ElapsedTime = response.ElapsedTime, ElapsedTime = response.ElapsedTime,
StatusCode = (int)response.HttpResponse.StatusCode StatusCode = (int)response.HttpResponse.StatusCode
}; };
@ -419,6 +426,8 @@ namespace NzbDrone.Core.Indexers
// Check reponse to see if auth is needed, if needed try again // Check reponse to see if auth is needed, if needed try again
if (CheckIfLoginNeeded(response)) if (CheckIfLoginNeeded(response))
{ {
_logger.Trace("Attempting to re-auth based on indexer search response");
DoLogin(); DoLogin();
request.HttpRequest.Cookies.Clear(); request.HttpRequest.Cookies.Clear();

Loading…
Cancel
Save