From a152ab2b5681c8060e561553b90135db77407042 Mon Sep 17 00:00:00 2001 From: Qstick Date: Tue, 24 Nov 2020 23:10:02 -0500 Subject: [PATCH] Fixed: Log only for quality mismatch between release and file --- .../Specifications/GrabbedReleaseQualityFixture.cs | 4 ++-- .../Specifications/GrabbedReleaseQualitySpecification.cs | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualityFixture.cs b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualityFixture.cs index aa8041cd7..e96efbfd1 100644 --- a/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualityFixture.cs +++ b/src/NzbDrone.Core.Test/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualityFixture.cs @@ -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.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(); } } } diff --git a/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualitySpecification.cs b/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualitySpecification.cs index b1829f708..eceb8693a 100644 --- a/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualitySpecification.cs +++ b/src/NzbDrone.Core/MediaFiles/MovieImport/Specifications/GrabbedReleaseQualitySpecification.cs @@ -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"); } }