@ -39,20 +39,20 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
var profile = subject . Movie . Profile . Value ;
var delayProfile = _delayProfileService . BestForTags ( subject . Movie . Tags ) ;
var delay = delayProfile . GetProtocolDelay ( subject . Release . DownloadProtocol ) ;
var isPreferredProtocol = subject . Release . DownloadProtocol = = delayProfile . PreferredProtocol ;
// Preferred word count
var title = subject . Release . Title ;
var preferredWords = subject . Movie . Profile . Value . PreferredTags ;
var preferredCount = 0 ;
if ( preferredWords = = null )
{
preferredCount = 1 ;
var isPreferredProtocol = subject . Release . DownloadProtocol = = delayProfile . PreferredProtocol ;
// Preferred word count
var title = subject . Release . Title ;
var preferredWords = subject . Movie . Profile . Value . PreferredTags ;
var preferredCount = 0 ;
if ( preferredWords = = null )
{
preferredCount = 1 ;
_logger . Debug ( "Preferred words is null, setting preffered count to 1." ) ;
}
else
{
}
else
{
preferredCount = preferredWords . AsEnumerable ( ) . Count ( w = > title . ToLower ( ) . Contains ( w . ToLower ( ) ) ) ;
}
@ -66,11 +66,11 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
if ( isPreferredProtocol & & ( subject . Movie . MovieFileId ! = 0 & & subject . Movie . MovieFile ! = null ) & & ( 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 . Quality, subject . ParsedMovieInfo . Quality ) ;
if ( upgradable )
{
var revisionUpgrade = _qualityUpgradableSpecification . IsRevisionUpgrade ( subject . Movie . MovieFile . Value. Quality, subject . ParsedMovieInfo . Quality ) ;
var revisionUpgrade = _qualityUpgradableSpecification . IsRevisionUpgrade ( subject . Movie . MovieFile . Quality, subject . ParsedMovieInfo . Quality ) ;
if ( revisionUpgrade )
{
@ -83,7 +83,7 @@ namespace NzbDrone.Core.DecisionEngine.Specifications.RssSync
// If quality meets or exceeds the best allowed quality in the profile accept it immediately
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 ) )
{