diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs index 89a28d53b..f8d798593 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/QualityUpgradeSpecificationFixture.cs @@ -57,5 +57,21 @@ public void should_return_false_if_proper_and_autoDownloadPropers_is_false() Subject.IsUpgradable(profile, new QualityModel(Quality.DVD, new Revision(version: 2)), new QualityModel(Quality.DVD, new Revision(version: 1))) .Should().BeFalse(); } + + + [Test] + public void should_return_false_if_release_and_existing_file_are_the_same() + { + var profile = new Profile + { + Items = Qualities.QualityFixture.GetDefaultQualities(), + }; + + Subject.IsUpgradable( + profile, + new QualityModel(Quality.HDTV720p, new Revision(version: 1)), + new QualityModel(Quality.HDTV720p, new Revision(version: 1))) + .Should().BeFalse(); + } } } diff --git a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs index c444860ff..139243cf7 100644 --- a/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs +++ b/src/NzbDrone.Core/DecisionEngine/Specifications/UpgradableSpecification.cs @@ -36,10 +36,12 @@ public bool IsUpgradable(Profile profile, QualityModel currentQuality, QualityMo if (IsRevisionUpgrade(currentQuality, newQuality)) { + _logger.Debug("New item has a better quality revision"); return true; } } + _logger.Debug("New item has a better quality"); return true; }