mirror of https://github.com/Sonarr/Sonarr
Fixed: Ignore file quality matching release quality for season packs
This commit is contained in:
parent
766520b851
commit
e8d01daf03
|
@ -63,6 +63,21 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
Subject.IsSatisfiedBy(_localEpisode, _downloadClientItem).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_accepted_if_grabbed_history_is_for_a_season_pack()
|
||||
{
|
||||
var history = Builder<History.History>.CreateListOfSize(1)
|
||||
.All()
|
||||
.With(h => h.EventType = HistoryEventType.Grabbed)
|
||||
.With(h => h.Quality = _localEpisode.Quality)
|
||||
.With(h => h.SourceTitle = "Series.Title.S01.720p.HDTV.x264-RlsGroup")
|
||||
.BuildList();
|
||||
|
||||
GivenHistory(history);
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode, _downloadClientItem).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_accepted_if_grabbed_history_quality_matches()
|
||||
{
|
||||
|
|
|
@ -36,6 +36,14 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|||
return Decision.Accept();
|
||||
}
|
||||
|
||||
var parsedReleaseName = Parser.Parser.ParseTitle(grabbedHistory.First().SourceTitle);
|
||||
|
||||
if (parsedReleaseName != null && parsedReleaseName.FullSeason)
|
||||
{
|
||||
_logger.Debug("File is part of a season pack, skipping.");
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
foreach (var item in grabbedHistory)
|
||||
{
|
||||
if (item.Quality != localEpisode.Quality)
|
||||
|
|
Loading…
Reference in New Issue