mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-01-10 01:40:29 +01:00
parent
25217c0ee8
commit
0a111e7572
3 changed files with 12 additions and 8 deletions
|
|
@ -945,6 +945,11 @@ protected string MatchSelector(HttpResponse response, SelectorField selector, Di
|
|||
|
||||
public bool CheckIfLoginIsNeeded(HttpResponse response)
|
||||
{
|
||||
if (_definition.Login == null || _definition.Login.Test == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (response.HasHttpRedirect)
|
||||
{
|
||||
var domainHint = GetRedirectDomainHint(response);
|
||||
|
|
@ -958,11 +963,6 @@ public bool CheckIfLoginIsNeeded(HttpResponse response)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (_definition.Login == null || _definition.Login.Test == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (response.HasHttpError)
|
||||
{
|
||||
return true;
|
||||
|
|
@ -1124,6 +1124,8 @@ private IEnumerable<IndexerRequest> GetRequest(Dictionary<string, object> variab
|
|||
|
||||
var request = new CardigannRequest(requestbuilder.SetEncoding(_encoding).Build(), variables, searchPath);
|
||||
|
||||
request.HttpRequest.AllowAutoRedirect = searchPath.Followredirect;
|
||||
|
||||
yield return request;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using DryIoc;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.IndexerSearch.Definitions;
|
||||
|
|
@ -268,7 +269,10 @@ private IEnumerable<IndexerRequest> GetPagedRequests(SearchCriteriaBase searchCr
|
|||
parameters.Add("offset", searchCriteria.Offset.ToString());
|
||||
}
|
||||
|
||||
yield return new IndexerRequest(string.Format("{0}&{1}", baseUrl, parameters.GetQueryString()), HttpAccept.Rss);
|
||||
var request = new IndexerRequest(string.Format("{0}&{1}", baseUrl, parameters.GetQueryString()), HttpAccept.Rss);
|
||||
request.HttpRequest.AllowAutoRedirect = true;
|
||||
|
||||
yield return request;
|
||||
}
|
||||
|
||||
private static string NewsnabifyTitle(string title)
|
||||
|
|
|
|||
|
|
@ -355,8 +355,6 @@ protected virtual async Task<IndexerResponse> FetchIndexerResponse(IndexerReques
|
|||
request.HttpRequest.LogResponseContent = true;
|
||||
}
|
||||
|
||||
request.HttpRequest.AllowAutoRedirect = FollowRedirect;
|
||||
|
||||
var originalUrl = request.Url;
|
||||
|
||||
Cookies = GetCookies();
|
||||
|
|
|
|||
Loading…
Reference in a new issue