mirror of https://github.com/lidarr/Lidarr
34 lines
974 B
C#
34 lines
974 B
C#
using System;
|
|
using NLog;
|
|
using NzbDrone.Core.DecisionEngine;
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|
{
|
|
public class FullSeasonSpecification : IImportDecisionEngineSpecification
|
|
{
|
|
private readonly Logger _logger;
|
|
|
|
public FullSeasonSpecification(Logger logger)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
public Decision IsSatisfiedBy(LocalTrack localTrack)
|
|
{
|
|
throw new NotImplementedException("Interface will be removed");
|
|
}
|
|
|
|
public Decision IsSatisfiedBy(LocalEpisode localEpisode)
|
|
{
|
|
if (localEpisode.ParsedEpisodeInfo.FullSeason)
|
|
{
|
|
_logger.Debug("Single episode file detected as containing all episodes in the season");
|
|
return Decision.Reject("Single episode file contains all episodes in seasons");
|
|
}
|
|
|
|
return Decision.Accept();
|
|
}
|
|
}
|
|
}
|