New: Add generic TorrentRssIndexer support.

Add support for generic RSS feeds. Parses the feed and tests if it is
EZTV compatible, or if it has all required fields for the generic
TorrentRssParser
This commit is contained in:
Michel Zehnder
2015-02-12 07:42:31 +01:00
committed by Taloth Saldono
parent bbcabf0632
commit 9d7522cc15
26 changed files with 4567 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ namespace NzbDrone.Core.Indexers
public abstract class HttpIndexerBase<TSettings> : IndexerBase<TSettings>
where TSettings : IProviderConfig, new()
{
private const Int32 MaxNumResultsPerQuery = 1000;
protected const Int32 MaxNumResultsPerQuery = 1000;
private readonly IHttpClient _httpClient;
@@ -190,13 +190,18 @@ namespace NzbDrone.Core.Indexers
protected virtual IList<ReleaseInfo> FetchPage(IndexerRequest request, IParseIndexerResponse parser)
{
_logger.Debug("Downloading Feed " + request.Url);
var response = new IndexerResponse(request, _httpClient.Execute(request.HttpRequest));
var response = FetchIndexerResponse(request);
return parser.ParseResponse(response).ToList();
}
protected virtual IndexerResponse FetchIndexerResponse(IndexerRequest request)
{
_logger.Debug("Downloading Feed " + request.Url);
return new IndexerResponse(request, _httpClient.Execute(request.HttpRequest));
}
protected override void Test(List<ValidationFailure> failures)
{
failures.AddIfNotNull(TestConnection());