Fixed: Daily shows will no longer skip sample detection
This commit is contained in:
parent
606875cc2e
commit
31deff1ea3
|
@ -54,21 +54,14 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_true_if_series_is_daily()
|
public void should_return_false_if_season_zero()
|
||||||
{
|
|
||||||
_series.SeriesType = SeriesTypes.Daily;
|
|
||||||
ShouldBeFalse();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_return_true_if_season_zero()
|
|
||||||
{
|
{
|
||||||
_localEpisode.Episodes[0].SeasonNumber = 0;
|
_localEpisode.Episodes[0].SeasonNumber = 0;
|
||||||
ShouldBeFalse();
|
ShouldBeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_true_for_flv()
|
public void should_return_false_for_flv()
|
||||||
{
|
{
|
||||||
_localEpisode.Path = @"C:\Test\some.show.s01e01.flv";
|
_localEpisode.Path = @"C:\Test\some.show.s01e01.flv";
|
||||||
|
|
||||||
|
@ -93,7 +86,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_false_if_runtime_is_less_than_minimum()
|
public void should_return_true_if_runtime_is_less_than_minimum()
|
||||||
{
|
{
|
||||||
GivenRuntime(60);
|
GivenRuntime(60);
|
||||||
|
|
||||||
|
@ -101,7 +94,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_true_if_runtime_greater_than_than_minimum()
|
public void should_return_false_if_runtime_greater_than_than_minimum()
|
||||||
{
|
{
|
||||||
GivenRuntime(120);
|
GivenRuntime(120);
|
||||||
|
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
if (!_sampleService.IsSample(series, quality, videoFile, size,
|
if (!_sampleService.IsSample(series, quality, videoFile, size,
|
||||||
episodeParseResult.SeasonNumber))
|
episodeParseResult.SeasonNumber))
|
||||||
{
|
{
|
||||||
_logger.Warn("Non-sample file has not been imported: [{0}]", videoFile);
|
_logger.Warn("Non-sample file detected: [{0}]", videoFile);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,12 +36,6 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport
|
||||||
|
|
||||||
public bool IsSample(Series series, QualityModel quality, string path, long size, int seasonNumber)
|
public bool IsSample(Series series, QualityModel quality, string path, long size, int seasonNumber)
|
||||||
{
|
{
|
||||||
if (series.SeriesType == SeriesTypes.Daily)
|
|
||||||
{
|
|
||||||
_logger.Debug("Daily Series, skipping sample check");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (seasonNumber == 0)
|
if (seasonNumber == 0)
|
||||||
{
|
{
|
||||||
_logger.Debug("Special, skipping sample check");
|
_logger.Debug("Special, skipping sample check");
|
||||||
|
|
Loading…
Reference in New Issue