Set up framework for artist indexer searching

This commit is contained in:
Daniel Underwood
2017-07-07 17:04:03 -04:00
parent d32cf1120e
commit c55e3f2c34
23 changed files with 176 additions and 0 deletions
@@ -18,6 +18,7 @@ namespace NzbDrone.Core.Indexers.Rarbg
public override string Name => "Rarbg";
public override DownloadProtocol Protocol => DownloadProtocol.Torrent;
public override TimeSpan RateLimit => TimeSpan.FromSeconds(2);
public Rarbg(IRarbgTokenProvider tokenProvider, IHttpClient httpClient, IIndexerStatusService indexerStatusService, IConfigService configService, IParsingService parsingService, Logger logger)
@@ -72,6 +72,15 @@ namespace NzbDrone.Core.Indexers.Rarbg
return pageableRequests;
}
public IndexerPageableRequestChain GetSearchRequests(AlbumSearchCriteria searchCriteria)
{
var pageableRequests = new IndexerPageableRequestChain();
pageableRequests.Add(GetPagedRequests("search", null, "{0}", searchCriteria.Album.Title));
return pageableRequests;
}
private IEnumerable<IndexerRequest> GetPagedRequests(string mode, int? tvdbId, string query, params object[] args)
{
var requestBuilder = new HttpRequestBuilder(Settings.BaseUrl)