mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Search improvements
New: Series/Season search will not grab unmonitored episodes Fixed: Missing episode search won't grab missing unmonitored episodes by mistake
This commit is contained in:
parent
32dd545ef9
commit
37959fd753
@ -105,10 +105,23 @@ public void only_second_episode_not_monitored_should_return_monitored()
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_if_it_is_a_search()
|
||||
public void should_return_true_for_single_episode_search()
|
||||
{
|
||||
_fakeSeries.Monitored = false;
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, new SeasonSearchCriteria()).Accepted.Should().BeTrue();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, new SingleEpisodeSearchCriteria()).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_if_episode_is_monitored_for_season_search()
|
||||
{
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, new SeasonSearchCriteria()).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_if_episode_is_not_monitored_for_season_search()
|
||||
{
|
||||
WithFirstEpisodeUnmonitored();
|
||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, new SeasonSearchCriteria()).Accepted.Should().BeFalse();
|
||||
}
|
||||
}
|
||||
}
|
@ -20,8 +20,11 @@ public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase
|
||||
{
|
||||
if (searchCriteria != null)
|
||||
{
|
||||
_logger.Debug("Skipping monitored check during search");
|
||||
return Decision.Accept();
|
||||
if ((searchCriteria as SeasonSearchCriteria) == null)
|
||||
{
|
||||
_logger.Debug("Skipping monitored check during search");
|
||||
return Decision.Accept();
|
||||
}
|
||||
}
|
||||
|
||||
if (!subject.Series.Monitored)
|
||||
|
@ -35,7 +35,7 @@ public void Execute(SeriesSearchCommand message)
|
||||
{
|
||||
if (!season.Monitored)
|
||||
{
|
||||
_logger.Debug("Season {0} of {1} is not monitored, skipping seaarch", season.SeasonNumber, series.Title);
|
||||
_logger.Debug("Season {0} of {1} is not monitored, skipping search", season.SeasonNumber, series.Title);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user