New: Manual single episode searches on BTN will now also search for season packs to simplify manually grabbing a season pack.

pull/4/head
Taloth Saldono 10 years ago
parent be338a651e
commit 14a99a28cc

@ -32,6 +32,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
return Decision.Reject("Wrong season");
}
if (!remoteEpisode.ParsedEpisodeInfo.EpisodeNumbers.Any())
{
_logger.Debug("Full season result during single episode search, skipping.");
return Decision.Reject("Full season pack");
}
if (!remoteEpisode.ParsedEpisodeInfo.EpisodeNumbers.Contains(singleEpisodeSpec.EpisodeNumber))
{
_logger.Debug("Episode number does not match searched episode number, skipping.");

@ -44,6 +44,16 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
pageableRequest.AddIfNotNull(GetPagedRequests(MaxPages, parameters));
}
foreach (var seasonNumber in searchCriteria.Episodes.Select(v => v.SeasonNumber).Distinct())
{
parameters = parameters.Clone();
parameters.Category = "Season";
parameters.Name = String.Format("Season {0}", seasonNumber);
pageableRequest.AddIfNotNull(GetPagedRequests(MaxPages, parameters));
}
}
return pageableRequest;

Loading…
Cancel
Save