mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-29 11:05:44 +00:00
Don't search for episodes in series that haven't aired yet
This commit is contained in:
parent
d4a4a4095e
commit
c9d21c7863
2 changed files with 5 additions and 1 deletions
|
@ -104,6 +104,7 @@ public class SingleEpisodeParserFixture : CoreTest
|
||||||
[TestCase("Entourage - S02E02 - My Maserati Does 185", "Entourage", 2, 2)]
|
[TestCase("Entourage - S02E02 - My Maserati Does 185", "Entourage", 2, 2)]
|
||||||
[TestCase("6x13 - The Family Guy 100th Episode Special", "", 6, 13)]
|
[TestCase("6x13 - The Family Guy 100th Episode Special", "", 6, 13)]
|
||||||
// [TestCase("Heroes - S01E01 - Genesis 101 [HDTV-720p]", "Heroes", 1, 1)]
|
// [TestCase("Heroes - S01E01 - Genesis 101 [HDTV-720p]", "Heroes", 1, 1)]
|
||||||
|
[TestCase("The 100 S02E01 HDTV x264-KILLERS [eztv]", "The 100", 2, 1)]
|
||||||
//[TestCase("", "", 0, 0)]
|
//[TestCase("", "", 0, 0)]
|
||||||
public void should_parse_single_episode(string postTitle, string title, int seasonNumber, int episodeNumber)
|
public void should_parse_single_episode(string postTitle, string title, int seasonNumber, int episodeNumber)
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,7 +115,10 @@ public void Execute(MissingEpisodeSearchCommand message)
|
||||||
if (message.SeriesId > 0)
|
if (message.SeriesId > 0)
|
||||||
{
|
{
|
||||||
episodes = _episodeService.GetEpisodeBySeries(message.SeriesId)
|
episodes = _episodeService.GetEpisodeBySeries(message.SeriesId)
|
||||||
.Where(e => e.Monitored && !e.HasFile)
|
.Where(e => e.Monitored &&
|
||||||
|
!e.HasFile &&
|
||||||
|
e.AirDateUtc.HasValue &&
|
||||||
|
e.AirDateUtc.Value.Before(DateTime.UtcNow))
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue