mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Reject m2ts (bluray) raw releases from BTN as well.
This commit is contained in:
parent
2b1c97ffa4
commit
e2272dcca3
@ -18,7 +18,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||
{
|
||||
[TestFixture]
|
||||
|
||||
public class DvdSpecificationFixture : CoreTest<DvdSpecification>
|
||||
public class RawDiskSpecificationFixture : CoreTest<RawDiskSpecification>
|
||||
{
|
||||
private RemoteEpisode _remoteEpisode;
|
||||
|
||||
@ -63,6 +63,13 @@ public void should_return_false_if_iso()
|
||||
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_if_m2ts()
|
||||
{
|
||||
WithContainer("M2TS");
|
||||
Subject.IsSatisfiedBy(_remoteEpisode, null).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_compare_case_insensitive()
|
||||
{
|
@ -156,7 +156,7 @@
|
||||
<Compile Include="DecisionEngineTests\RssSync\ProperSpecificationFixture.cs" />
|
||||
<Compile Include="DecisionEngineTests\Search\SeriesSpecificationFixture.cs" />
|
||||
<Compile Include="DecisionEngineTests\SameEpisodesSpecificationFixture.cs" />
|
||||
<Compile Include="DecisionEngineTests\DvdSpecificationFixture.cs" />
|
||||
<Compile Include="DecisionEngineTests\RawDiskSpecificationFixture.cs" />
|
||||
<Compile Include="DecisionEngineTests\UpgradeDiskSpecificationFixture.cs" />
|
||||
<Compile Include="Download\CompletedDownloadServiceFixture.cs" />
|
||||
<Compile Include="Download\DownloadApprovedReportsTests\DownloadApprovedFixture.cs" />
|
||||
|
@ -6,13 +6,15 @@
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
{
|
||||
public class DvdSpecification : IDecisionEngineSpecification
|
||||
public class RawDiskSpecification : IDecisionEngineSpecification
|
||||
{
|
||||
private static readonly string[] _dvdContainerTypes = new[] { "vob", "iso" };
|
||||
|
||||
private static readonly string[] _blurayContainerTypes = new[] { "m2ts" };
|
||||
|
||||
private readonly Logger _logger;
|
||||
|
||||
public DvdSpecification(Logger logger)
|
||||
public RawDiskSpecification(Logger logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
@ -32,6 +34,12 @@ public virtual Decision IsSatisfiedBy(RemoteEpisode subject, SearchCriteriaBase
|
||||
return Decision.Reject("Raw DVD release");
|
||||
}
|
||||
|
||||
if (_blurayContainerTypes.Contains(subject.Release.Container.ToLower()))
|
||||
{
|
||||
_logger.Debug("Release contains raw Bluray, rejecting.");
|
||||
return Decision.Reject("Raw Bluray release");
|
||||
}
|
||||
|
||||
return Decision.Accept();
|
||||
}
|
||||
}
|
@ -331,7 +331,7 @@
|
||||
<Compile Include="DecisionEngine\Specifications\Search\SingleEpisodeSearchMatchSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\Search\TorrentSeedingSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\SameEpisodesGrabSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\DvdSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\RawDiskSpecification.cs" />
|
||||
<Compile Include="DecisionEngine\Specifications\UpgradeDiskSpecification.cs" />
|
||||
<Compile Include="DiskSpace\DiskSpace.cs" />
|
||||
<Compile Include="DiskSpace\DiskSpaceService.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user