1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-09-11 12:02:35 +02:00

Fixed: Ignore file quality matching release quality for season packs

This commit is contained in:
Mark McDowall 2017-05-15 23:58:07 -07:00
parent 766520b851
commit e8d01daf03
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0
2 changed files with 23 additions and 0 deletions

View File

@ -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()
{

View File

@ -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)