mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Log only for quality mismatch between release and file
This commit is contained in:
parent
6bfd9f0e18
commit
a152ab2b56
@ -92,7 +92,7 @@ public void should_be_accepted_if_grabbed_history_quality_matches()
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[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)
|
var history = Builder<MovieHistory>.CreateListOfSize(1)
|
||||||
.All()
|
.All()
|
||||||
@ -102,7 +102,7 @@ public void should_be_rejected_if_grabbed_history_quality_does_not_match()
|
|||||||
|
|
||||||
GivenHistory(history);
|
GivenHistory(history);
|
||||||
|
|
||||||
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeFalse();
|
Subject.IsSatisfiedBy(_localMovie, _downloadClientItem).Accepted.Should().BeTrue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,22 +14,18 @@ public class GrabbedReleaseQualitySpecification : IImportDecisionEngineSpecifica
|
|||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
private readonly IHistoryService _historyService;
|
private readonly IHistoryService _historyService;
|
||||||
private readonly IParsingService _parsingService;
|
|
||||||
|
|
||||||
public GrabbedReleaseQualitySpecification(Logger logger,
|
public GrabbedReleaseQualitySpecification(Logger logger,
|
||||||
IHistoryService historyService,
|
IHistoryService historyService)
|
||||||
IParsingService parsingService)
|
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_historyService = historyService;
|
_historyService = historyService;
|
||||||
_parsingService = parsingService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Decision IsSatisfiedBy(LocalMovie localMovie, DownloadClientItem downloadClientItem)
|
public Decision IsSatisfiedBy(LocalMovie localMovie, DownloadClientItem downloadClientItem)
|
||||||
{
|
{
|
||||||
if (downloadClientItem == null)
|
if (downloadClientItem == null)
|
||||||
{
|
{
|
||||||
_logger.Debug("No download client item provided, skipping.");
|
|
||||||
return Decision.Accept();
|
return Decision.Accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,8 +43,8 @@ public Decision IsSatisfiedBy(LocalMovie localMovie, DownloadClientItem download
|
|||||||
{
|
{
|
||||||
if (item.Quality.Quality != Quality.Unknown && item.Quality != localMovie.Quality)
|
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);
|
_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…
Reference in New Issue
Block a user