mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Fixed: Don't use folder quality when it is unknown and file quality is
Closes #560
This commit is contained in:
parent
4a6778c609
commit
bbcabf0632
@ -345,5 +345,23 @@ public void should_not_use_folder_name_if_file_name_is_scene_name()
|
||||
Mocker.GetMock<IParsingService>()
|
||||
.Verify(c => c.GetLocalEpisode(It.IsAny<string>(), It.IsAny<Series>(), It.Is<ParsedEpisodeInfo>(p => p != null), true), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_use_folder_quality_when_it_is_unknown()
|
||||
{
|
||||
GivenSpecifications(_pass1, _pass2, _pass3);
|
||||
|
||||
_series.Profile = new Profile
|
||||
{
|
||||
Items = Qualities.QualityFixture.GetDefaultQualities(Quality.DVD, Quality.Unknown)
|
||||
};
|
||||
|
||||
|
||||
var folderQuality = new QualityModel(Quality.Unknown);
|
||||
|
||||
var result = Subject.GetImportDecisions(_videoFiles, _series, new ParsedEpisodeInfo { Quality = folderQuality}, true);
|
||||
|
||||
result.Single().LocalEpisode.Quality.Should().Be(_quality);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -182,8 +182,8 @@ private bool ShouldUseFolderName(List<string> videoFiles, Series series, ParsedE
|
||||
private QualityModel GetQuality(ParsedEpisodeInfo folderInfo, QualityModel fileQuality, Series series)
|
||||
{
|
||||
if (folderInfo != null &&
|
||||
new QualityModelComparer(series.Profile).Compare(folderInfo.Quality,
|
||||
fileQuality) > 0)
|
||||
folderInfo.Quality.Quality != Quality.Unknown &&
|
||||
new QualityModelComparer(series.Profile).Compare(folderInfo.Quality, fileQuality) > 0)
|
||||
{
|
||||
_logger.Debug("Using quality from folder: {0}", folderInfo.Quality);
|
||||
return folderInfo.Quality;
|
||||
|
Loading…
Reference in New Issue
Block a user