1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-23 22:25:56 -04:00

Fixed: Reject full bluray disc releases

Closes #1995
This commit is contained in:
Mark McDowall
2017-07-09 22:17:04 -07:00
parent 6bbdefb11e
commit d4e771117d
2 changed files with 39 additions and 5 deletions
@@ -19,7 +19,11 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
{
_remoteEpisode = new RemoteEpisode
{
Release = new ReleaseInfo() { DownloadProtocol = DownloadProtocol.Torrent }
Release = new ReleaseInfo
{
Title = "Series.title.s01e01",
DownloadProtocol = DownloadProtocol.Torrent
}
};
}
@@ -29,7 +33,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
}
[Test]
public void should_return_true_if_no_container_specified()
public void should_return_true_if_no_container_specified_and_does_not_match_disc_release_pattern()
{
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeTrue();
}
@@ -69,5 +73,15 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeFalse();
}
[TestCase("How the Earth Was Made S02 Disc 1 1080i Blu-ray DTS-HD MA 2.0 AVC-TrollHD")]
[TestCase("The Universe S03 Disc 1 1080p Blu-ray LPCM 2.0 AVC-TrollHD")]
[TestCase("HELL ON WHEELS S02 1080P FULL BLURAY AVC DTS-HD MA 5 1")]
[TestCase("Game.of.Thrones.S06.2016.DISC.3.BluRay.1080p.AVC.Atmos.TrueHD7.1-MTeam")]
[TestCase("Game of Thrones S05 Disc 1 BluRay 1080p AVC Atmos TrueHD 7 1-MTeam")]
public void should_return_false_if_matches_disc_format(string title)
{
_remoteEpisode.Release.Title = title;
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeFalse();
}
}
}