mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed: Ignore file quality matching release quality for season packs
This commit is contained in:
parent
766520b851
commit
e8d01daf03
@ -63,6 +63,21 @@ public void should_be_accepted_if_no_grabbed_history_for_downloadId()
|
||||
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 @@ public Decision IsSatisfiedBy(LocalEpisode localEpisode, DownloadClientItem down
|
||||
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
Block a user