mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
Cleanup and updates for XEM
SceneSource added to signify to lookup via scene name Use Episodes for naming instead of EpisodeNumbers (in ParseResult)
This commit is contained in:
parent
c9c967fa1d
commit
9c6d78d479
22 changed files with 157 additions and 44 deletions
|
@ -29,9 +29,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;
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|||
}
|
||||
|
||||
var episodes = _episodeProvider.GetEpisodesByParseResult(subject);
|
||||
subject.Episodes = episodes;
|
||||
|
||||
//return monitored if any of the episodes are monitored
|
||||
if (episodes.Any(episode => !episode.Ignored))
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|||
|
||||
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
|
||||
{
|
||||
foreach (var file in _episodeProvider.GetEpisodesByParseResult(subject).Select(c => c.EpisodeFile).Where(c => c != null))
|
||||
foreach (var file in subject.Episodes.Select(c => c.EpisodeFile).Where(c => c != null))
|
||||
{
|
||||
logger.Trace("Comparing file quality with report. Existing file is {0} proper:{1}", file.Quality, file.Proper);
|
||||
if (!_qualityUpgradeSpecification.IsSatisfiedBy(new Quality { QualityType = file.Quality, Proper = file.Proper }, subject.Quality, subject.Series.QualityProfile.Cutoff))
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
|
|||
|
||||
public virtual bool IsSatisfiedBy(EpisodeParseResult subject)
|
||||
{
|
||||
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(subject))
|
||||
foreach (var episode in subject.Episodes)
|
||||
{
|
||||
var bestQualityInHistory = _historyProvider.GetBestQualityInHistory(subject.Series.SeriesId, episode.SeasonNumber, episode.EpisodeNumber);
|
||||
if (bestQualityInHistory != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue