Fixup tests
This commit is contained in:
parent
06c7f6034d
commit
0ef28e5786
|
@ -35,24 +35,26 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Aggregation.Aggregators.Au
|
|||
Subject.AugmentQuality(localEpisode, null).Should().Be(null);
|
||||
}
|
||||
|
||||
[TestCase(4096, 2160)] // True 4K
|
||||
[TestCase(4000, 2160)]
|
||||
[TestCase(3840, 2160)] // 4K UHD
|
||||
[TestCase(3200, 2160)]
|
||||
[TestCase(2000, 1080)]
|
||||
[TestCase(1920, 1080)] // Full HD
|
||||
[TestCase(1800, 1080)]
|
||||
[TestCase(1490, 720)]
|
||||
[TestCase(1280, 720)] // HD
|
||||
[TestCase(1200, 720)]
|
||||
[TestCase(800, 480)]
|
||||
[TestCase(720, 480)] // SDTV
|
||||
[TestCase(600, 480)]
|
||||
[TestCase(100, 480)]
|
||||
public void should_return_closest_resolution(int mediaInfoWidth, int expectedResolution)
|
||||
[TestCase(4096, 1, 2160)] // True 4K
|
||||
[TestCase(4000, 1, 2160)]
|
||||
[TestCase(3840, 1, 2160)] // 4K UHD
|
||||
[TestCase(3200, 1, 2160)]
|
||||
[TestCase(2000, 1, 1080)]
|
||||
[TestCase(1920, 1, 1080)] // Full HD
|
||||
[TestCase(1440, 1080, 1080)] // 4:3 FullHD
|
||||
[TestCase(1800, 1, 1080)]
|
||||
[TestCase(1490, 1, 720)]
|
||||
[TestCase(1280, 1, 720)] // HD
|
||||
[TestCase(1200, 1, 720)]
|
||||
[TestCase(800, 1, 480)]
|
||||
[TestCase(720, 1, 480)] // SDTV
|
||||
[TestCase(600, 1, 480)]
|
||||
[TestCase(100, 1, 480)]
|
||||
public void should_return_closest_resolution(int mediaInfoWidth, int mediaInfoHeight, int expectedResolution)
|
||||
{
|
||||
var mediaInfo = Builder<MediaInfoModel>.CreateNew()
|
||||
.With(m => m.Width = mediaInfoWidth)
|
||||
.With(m => m.Height = mediaInfoHeight)
|
||||
.Build();
|
||||
|
||||
var localEpisode = Builder<LocalEpisode>.CreateNew()
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Aggregation.Aggregators.Augment
|
|||
return AugmentQualityResult.ResolutionOnly(720, Confidence.MediaInfo);
|
||||
}
|
||||
|
||||
if (width > 0 || height > 0)
|
||||
if (width > 0 && height > 0)
|
||||
{
|
||||
_logger.Trace("Resolution {0}x{1} considered 480p", width, height);
|
||||
return AugmentQualityResult.ResolutionOnly(480, Confidence.MediaInfo);
|
||||
|
|
Loading…
Reference in New Issue