mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 02:22:31 +01:00
New: Manual single episode searches on BTN will now also search for season packs to simplify manually grabbing a season pack.
This commit is contained in:
parent
be338a651e
commit
14a99a28cc
@ -32,6 +32,12 @@ public Decision IsSatisfiedBy(RemoteEpisode remoteEpisode, SearchCriteriaBase se
|
||||
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 @@ public virtual IList<IEnumerable<IndexerRequest>> GetSearchRequests(SingleEpisod
|
||||
|
||||
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…
Reference in New Issue
Block a user