Fixed: Log only for quality mismatch between release and file

pull/5406/head
Qstick 4 years ago
parent 6bfd9f0e18
commit a152ab2b56

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

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

Loading…
Cancel
Save