mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
Fixed: Searching for unmonitored anime episodes during season/all missing searches
This commit is contained in:
parent
adfaa00ce1
commit
90b047f0d4
@ -37,6 +37,7 @@ public void SetUp()
|
||||
|
||||
_xemSeries = Builder<Series>.CreateNew()
|
||||
.With(v => v.UseSceneNumbering = true)
|
||||
.With(v => v.Monitored = true)
|
||||
.Build();
|
||||
|
||||
_xemEpisodes = new List<Episode>();
|
||||
@ -63,6 +64,7 @@ private void WithEpisode(Int32 seasonNumber, Int32 episodeNumber, Int32? sceneSe
|
||||
.With(v => v.EpisodeNumber, episodeNumber)
|
||||
.With(v => v.SceneSeasonNumber, sceneSeasonNumber)
|
||||
.With(v => v.SceneEpisodeNumber, sceneEpisodeNumber)
|
||||
.With(v => v.Monitored = true)
|
||||
.Build();
|
||||
|
||||
_xemEpisodes.Add(episode);
|
||||
@ -196,12 +198,12 @@ public void scene_seasonsearch_should_use_seasonnumber_if_no_scene_number_is_ava
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void season_search_for_anime_should_search_for_each_episode()
|
||||
public void season_search_for_anime_should_search_for_each_monitored_episode()
|
||||
{
|
||||
WithEpisodes();
|
||||
_xemSeries.SeriesType = SeriesTypes.Anime;
|
||||
var seasonNumber = 1;
|
||||
|
||||
var seasonNumber = 1;
|
||||
var allCriteria = WatchForSearchCriteria();
|
||||
|
||||
Subject.SeasonSearch(_xemSeries.Id, seasonNumber);
|
||||
@ -210,5 +212,22 @@ public void season_search_for_anime_should_search_for_each_episode()
|
||||
|
||||
criteria.Count.Should().Be(_xemEpisodes.Count(e => e.SeasonNumber == seasonNumber));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void season_search_for_anime_should_not_search_for_unmonitored_episodes()
|
||||
{
|
||||
WithEpisodes();
|
||||
_xemSeries.SeriesType = SeriesTypes.Anime;
|
||||
_xemEpisodes.ForEach(e => e.Monitored = false);
|
||||
|
||||
var seasonNumber = 1;
|
||||
var allCriteria = WatchForSearchCriteria();
|
||||
|
||||
Subject.SeasonSearch(_xemSeries.Id, seasonNumber);
|
||||
|
||||
var criteria = allCriteria.OfType<AnimeEpisodeSearchCriteria>().ToList();
|
||||
|
||||
criteria.Count.Should().Be(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,10 @@ private List<DownloadDecision> SearchAnimeSeason(Series series, List<Episode> ep
|
||||
|
||||
foreach (var episode in episodes)
|
||||
{
|
||||
downloadDecisions.AddRange(SearchAnime(series, episode));
|
||||
if (episode.Monitored)
|
||||
{
|
||||
downloadDecisions.AddRange(SearchAnime(series, episode));
|
||||
}
|
||||
}
|
||||
|
||||
return downloadDecisions;
|
||||
|
Loading…
Reference in New Issue
Block a user