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:
parent
3ba72fd33b
commit
6c84518b40
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user