mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed broken tests from merge
This commit is contained in:
parent
5bbe310af5
commit
73e82c2f69
2 changed files with 8 additions and 18 deletions
|
@ -7,20 +7,8 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|||
{
|
||||
public class CustomStartDateSpecification
|
||||
{
|
||||
private readonly EpisodeProvider _episodeProvider;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
[Inject]
|
||||
public CustomStartDateSpecification(EpisodeProvider episodeProvider)
|
||||
{
|
||||
_episodeProvider = episodeProvider;
|
||||
}
|
||||
|
||||
public CustomStartDateSpecification()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
|
||||
{
|
||||
if (!subject.Series.CustomStartDate.HasValue)
|
||||
|
@ -29,9 +17,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|||
return true;
|
||||
}
|
||||
|
||||
var episodes = _episodeProvider.GetEpisodesByParseResult(subject);
|
||||
|
||||
if (episodes.Any(episode => episode.AirDate >= subject.Series.CustomStartDate.Value))
|
||||
if (subject.Episodes.Any(episode => episode.AirDate >= subject.Series.CustomStartDate.Value))
|
||||
{
|
||||
logger.Debug("One or more episodes aired after cutoff, downloading.");
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue