|
|
@ -44,7 +44,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
|
|
|
// Preferred word count
|
|
|
|
// Preferred word count
|
|
|
|
var title = subject.Release.Title;
|
|
|
|
var title = subject.Release.Title;
|
|
|
|
var preferredWords = subject.Movie.Profile.Value.PreferredTags;
|
|
|
|
var preferredWords = subject.Movie.Profile.Value.PreferredTags;
|
|
|
|
var preferredcount = preferredWords.AsEnumerable().Count(w => title.ToLower().Contains(w.ToLower()));
|
|
|
|
var preferredCount = preferredWords.AsEnumerable().Count(w => title.ToLower().Contains(w.ToLower()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (delay == 0)
|
|
|
|
if (delay == 0)
|
|
|
@ -55,7 +55,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
|
|
|
|
|
|
|
|
|
|
|
var comparer = new QualityModelComparer(profile);
|
|
|
|
var comparer = new QualityModelComparer(profile);
|
|
|
|
|
|
|
|
|
|
|
|
if (isPreferredProtocol && (subject.Movie.MovieFileId != 0) && (preferredcount > 0 || preferredWords == null))
|
|
|
|
if (isPreferredProtocol && (subject.Movie.MovieFileId != 0) && (preferredCount > 0 || preferredWords == null))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var upgradable = _qualityUpgradableSpecification.IsUpgradable(profile, subject.Movie.MovieFile.Value.Quality, subject.ParsedMovieInfo.Quality);
|
|
|
|
var upgradable = _qualityUpgradableSpecification.IsUpgradable(profile, subject.Movie.MovieFile.Value.Quality, subject.ParsedMovieInfo.Quality);
|
|
|
|
|
|
|
|
|
|
|
@ -65,7 +65,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
|
|
|
|
|
|
|
|
|
|
|
if (revisionUpgrade)
|
|
|
|
if (revisionUpgrade)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Debug("New quality is a better revision for existing quality and preferred word count is {0}, skipping delay", preferredcount);
|
|
|
|
_logger.Debug("New quality is a better revision for existing quality and preferred word count is {0}, skipping delay", preferredCount);
|
|
|
|
return Decision.Accept();
|
|
|
|
return Decision.Accept();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -76,9 +76,9 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
|
|
|
|
var bestQualityInProfile = new QualityModel(profile.LastAllowedQuality());
|
|
|
|
var bestQualityInProfile = new QualityModel(profile.LastAllowedQuality());
|
|
|
|
var isBestInProfile = comparer.Compare(subject.ParsedMovieInfo.Quality, bestQualityInProfile) >= 0;
|
|
|
|
var isBestInProfile = comparer.Compare(subject.ParsedMovieInfo.Quality, bestQualityInProfile) >= 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (isBestInProfile && isPreferredProtocol && (preferredcount > 0 || preferredWords == null))
|
|
|
|
if (isBestInProfile && isPreferredProtocol && (preferredCount > 0 || preferredWords == null))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Debug("Quality is highest in profile for preferred protocol and preferred word count is {0}, will not delay.", preferredcount);
|
|
|
|
_logger.Debug("Quality is highest in profile for preferred protocol and preferred word count is {0}, will not delay.", preferredCount);
|
|
|
|
return Decision.Accept();
|
|
|
|
return Decision.Accept();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|