1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 09:18:34 +00:00

Sample check reduced to 3 minutes

This commit is contained in:
Mark McDowall 2013-01-25 23:18:42 -08:00
parent b7229dea06
commit 3b16d68d0b
2 changed files with 6 additions and 6 deletions

View file

@ -401,7 +401,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
}
[Test]
public void should_return_null_if_file_size_is_under_70MB_and_runTime_under_8_minutes()
public void should_return_null_if_file_size_is_under_70MB_and_runTime_under_3_minutes()
{
var series = Builder<Series>
.CreateNew()
@ -419,13 +419,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
Mocker.GetMock<MediaInfoProvider>()
.Setup(s => s.GetRunTime(path))
.Returns(300);
.Returns(60);
Mocker.Resolve<DiskScanProvider>().ImportFile(series, path).Should().BeNull();
}
[Test]
public void should_import_if_file_size_is_under_70MB_but_runTime_over_8_minutes()
public void should_import_if_file_size_is_under_70MB_but_runTime_over_3_minutes()
{
var fakeSeries = Builder<Series>.CreateNew().Build();
@ -458,7 +458,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
}
[Test]
public void should_import_if_file_size_is_over_70MB_but_runTime_under_8_minutes()
public void should_import_if_file_size_is_over_70MB_but_runTime_under_3_minutes()
{
With80MBFile();
@ -477,7 +477,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
Mocker.GetMock<MediaInfoProvider>()
.Setup(s => s.GetRunTime(path))
.Returns(600);
.Returns(60);
Mocker.GetMock<EpisodeProvider>()
.Setup(e => e.GetEpisodesByParseResult(It.IsAny<EpisodeParseResult>())).Returns(new List<Episode> { fakeEpisode });

View file

@ -114,7 +114,7 @@ namespace NzbDrone.Core.Providers
long size = _diskProvider.GetSize(filePath);
var runTime = _mediaInfoProvider.GetRunTime(filePath);
if(size < Constants.IgnoreFileSize && runTime < 480)
if(size < Constants.IgnoreFileSize && runTime < 180)
{
Logger.Trace("[{0}] appears to be a sample. skipping.", filePath);
return null;