mirror of https://github.com/Sonarr/Sonarr
Fixed: Interactive Search for Specials on BTN
This commit is contained in:
parent
5062d74041
commit
8102cb63ae
|
@ -175,7 +175,28 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
|
|||
|
||||
public virtual IndexerPageableRequestChain GetSearchRequests(SpecialEpisodeSearchCriteria searchCriteria)
|
||||
{
|
||||
return new IndexerPageableRequestChain();
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
var parameters = new BroadcastheNetTorrentQuery();
|
||||
if (AddSeriesSearchParameters(parameters, searchCriteria))
|
||||
{
|
||||
var episodeQueryTitle = searchCriteria.Episodes.Where(e => !string.IsNullOrWhiteSpace(e.Title))
|
||||
.Select(e => SearchCriteriaBase.GetQueryTitle(e.Title))
|
||||
.ToArray();
|
||||
|
||||
foreach (var queryTitle in episodeQueryTitle)
|
||||
{
|
||||
parameters = parameters.Clone();
|
||||
|
||||
parameters.Category = "Episode";
|
||||
parameters.Name = "%" + queryTitle + "%";
|
||||
|
||||
|
||||
pageableRequests.Add(GetPagedRequests(MaxPages, parameters));
|
||||
}
|
||||
}
|
||||
|
||||
return pageableRequests;
|
||||
}
|
||||
|
||||
private bool AddSeriesSearchParameters(BroadcastheNetTorrentQuery parameters, SearchCriteriaBase searchCriteria)
|
||||
|
|
Loading…
Reference in New Issue