@ -141,5 +141,12 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
WithFirstEpisodeLastYear();
_customStartDateSpecification.IsSatisfiedBy(parseResultSingle).Should().BeFalse();
}
[Test]
public void should_return_true_if_episode_airs_the_same_day_as_the_cutoff()
{
fakeSeries.CustomStartDate = DateTime.Today;
_customStartDateSpecification.IsSatisfiedBy(parseResultSingle).Should().BeTrue();
@ -31,7 +31,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
var episodes = _episodeProvider.GetEpisodesByParseResult(subject);
if (episodes.Any(episode => episode.AirDate > subject.Series.CustomStartDate.Value))
if (episodes.Any(episode => episode.AirDate >= subject.Series.CustomStartDate.Value))
logger.Debug("One or more episodes aired after cutoff, downloading.");
return true;
@ -82,6 +82,9 @@ namespace NzbDrone.Web.Controllers
if (!String.IsNullOrWhiteSpace(seriesModel.CustomStartDate))
series.CustomStartDate = DateTime.Parse(seriesModel.CustomStartDate, null, DateTimeStyles.RoundtripKind);
else
series.CustomStartDate = null;
_seriesProvider.UpdateSeries(series);
return new EmptyResult();