Fixed: Log only for quality mismatch between release and file

This commit is contained in:
Qstick 2020-11-24 23:10:02 -05:00
parent 6bfd9f0e18
commit a152ab2b56
2 changed files with 4 additions and 8 deletions

View File

@ -92,7 +92,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Specifications
}
[Test]
public void should_be_rejected_if_grabbed_history_quality_does_not_match()
public void should_be_accepted_if_grabbed_history_quality_does_not_match_log_only()
{
var history = Builder<MovieHistory>.CreateListOfSize(1)
.All()
@ -102,7 +102,7 @@ namespace NzbDrone.Core.Test.MediaFiles.MovieImport.Specifications
GivenHistory(history);
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeFalse();
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeTrue();
}
}
}

View File

@ -14,22 +14,18 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Specifications
{
private readonly Logger _logger;
private readonly IHistoryService _historyService;
private readonly IParsingService _parsingService;
public GrabbedReleaseQualitySpecification(Logger logger,
IHistoryService historyService,
IParsingService parsingService)
IHistoryService historyService)
{
_logger = logger;
_historyService = historyService;
_parsingService = parsingService;
}
public Decision IsSatisfiedBy(LocalMovie localMovie, DownloadClientItem downloadClientItem)
{
if (downloadClientItem == null)
{
_logger.Debug("No download client item provided, skipping.");
return Decision.Accept();
}
@ -47,8 +43,8 @@ namespace NzbDrone.Core.MediaFiles.MovieImport.Specifications
{
if (item.Quality.Quality != Quality.Unknown && item.Quality != localMovie.Quality)
{
// Log only for info, spec removed due to common webdl/webrip mismatches
_logger.Debug("Quality for grabbed release ({0}) does not match the quality of the file ({1})", item.Quality, localMovie.Quality);
return Decision.Reject("File quality does not match quality of the grabbed release");
}
}