1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

New: Improve logging when checking if release is an upgrade

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2019-07-26 22:09:46 -04:00
parent 3ba72fd33b
commit 6c84518b40
2 changed files with 18 additions and 0 deletions

View File

@ -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();
}
}
}

View File

@ -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;
}