Fixed: Allow Redirects on Newznab Search Requests (Fixes DS)

This commit is contained in:
Qstick
2021-02-19 16:25:39 -05:00
parent dd1ced2d5e
commit 9d06a29062
3 changed files with 5 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ namespace NzbDrone.Core.Indexers.Newznab
public override string Name => "Newznab";
public override string BaseUrl => Settings.BaseUrl;
public override bool FollowRedirect => true;
public override DownloadProtocol Protocol => DownloadProtocol.Usenet;
public override IndexerPrivacy Privacy => IndexerPrivacy.Private;

View File

@@ -28,6 +28,8 @@ namespace NzbDrone.Core.Indexers
public override bool SupportsRss => true;
public override bool SupportsSearch => true;
public override bool FollowRedirect => false;
public override IndexerCapabilities Capabilities { get; protected set; }
public virtual int PageSize => 0;
public virtual TimeSpan RateLimit => TimeSpan.FromSeconds(2);
@@ -397,7 +399,7 @@ namespace NzbDrone.Core.Indexers
request.HttpRequest.RateLimit = RateLimit;
}
request.HttpRequest.AllowAutoRedirect = false;
request.HttpRequest.AllowAutoRedirect = FollowRedirect;
Cookies = GetCookies();

View File

@@ -22,6 +22,7 @@ namespace NzbDrone.Core.Indexers
public abstract string Name { get; }
public abstract string BaseUrl { get; }
public abstract bool FollowRedirect { get; }
public abstract DownloadProtocol Protocol { get; }
public abstract IndexerPrivacy Privacy { get; }
public int Priority { get; set; }