mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
broke episodeparseresult into filenameparseresult and indexerparseresult
This commit is contained in:
parent
89f261eddf
commit
7c1e81a70e
61 changed files with 248 additions and 251 deletions
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
|||
return "Episode doesn't match";
|
||||
}
|
||||
}
|
||||
public bool IsSatisfiedBy(EpisodeParseResult episodeParseResult, SearchDefinitionBase searchDefinitionBase)
|
||||
public bool IsSatisfiedBy(IndexerParseResult indexerParseResult, SearchDefinitionBase searchDefinitionBase)
|
||||
{
|
||||
var dailySearchSpec = searchDefinitionBase as DailyEpisodeSearchDefinition;
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
|||
|
||||
var episode = _episodeService.GetEpisode(dailySearchSpec.SeriesId, dailySearchSpec.Airtime);
|
||||
|
||||
if (!episodeParseResult.AirDate.HasValue || episodeParseResult.AirDate.Value != episode.AirDate.Value)
|
||||
if (!indexerParseResult.AirDate.HasValue || indexerParseResult.AirDate.Value != episode.AirDate.Value)
|
||||
{
|
||||
_logger.Trace("Episode AirDate does not match searched episode number, skipping.");
|
||||
return false;
|
||||
|
|
|
@ -6,6 +6,6 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
|||
{
|
||||
public interface IDecisionEngineSearchSpecification : IRejectWithReason
|
||||
{
|
||||
bool IsSatisfiedBy(EpisodeParseResult subject, SearchDefinitionBase searchDefinitionBase);
|
||||
bool IsSatisfiedBy(IndexerParseResult indexerParseResult, SearchDefinitionBase searchDefinitionBase);
|
||||
}
|
||||
}
|
|
@ -21,12 +21,12 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsSatisfiedBy(EpisodeParseResult episodeParseResult, SearchDefinitionBase searchDefinitionBase)
|
||||
public bool IsSatisfiedBy(IndexerParseResult indexerParseResult, SearchDefinitionBase searchDefinitionBase)
|
||||
{
|
||||
var singleEpisodeSpec = searchDefinitionBase as SeasonSearchDefinition;
|
||||
if (singleEpisodeSpec == null) return true;
|
||||
|
||||
if (singleEpisodeSpec.SeasonNumber != episodeParseResult.SeasonNumber)
|
||||
if (singleEpisodeSpec.SeasonNumber != indexerParseResult.SeasonNumber)
|
||||
{
|
||||
_logger.Trace("Season number does not match searched season number, skipping.");
|
||||
return false;
|
||||
|
|
|
@ -21,18 +21,18 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.Search
|
|||
}
|
||||
}
|
||||
|
||||
public bool IsSatisfiedBy(EpisodeParseResult episodeParseResult, SearchDefinitionBase searchDefinitionBase)
|
||||
public bool IsSatisfiedBy(IndexerParseResult indexerParseResult, SearchDefinitionBase searchDefinitionBase)
|
||||
{
|
||||
var singleEpisodeSpec = searchDefinitionBase as SingleEpisodeSearchDefinition;
|
||||
if (singleEpisodeSpec == null) return true;
|
||||
|
||||
if (singleEpisodeSpec.SeasonNumber != episodeParseResult.SeasonNumber)
|
||||
if (singleEpisodeSpec.SeasonNumber != indexerParseResult.SeasonNumber)
|
||||
{
|
||||
_logger.Trace("Season number does not match searched season number, skipping.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!episodeParseResult.EpisodeNumbers.Contains(singleEpisodeSpec.EpisodeNumber))
|
||||
if (!indexerParseResult.EpisodeNumbers.Contains(singleEpisodeSpec.EpisodeNumber))
|
||||
{
|
||||
_logger.Trace("Episode number does not match searched episode number, skipping.");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue