mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Fixed: Daily shows will no longer skip sample detection
This commit is contained in:
parent
606875cc2e
commit
31deff1ea3
@ -54,21 +54,14 @@ private void GivenRuntime(int seconds)
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_if_series_is_daily()
|
||||
{
|
||||
_series.SeriesType = SeriesTypes.Daily;
|
||||
ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_if_season_zero()
|
||||
public void should_return_false_if_season_zero()
|
||||
{
|
||||
_localEpisode.Episodes[0].SeasonNumber = 0;
|
||||
ShouldBeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_for_flv()
|
||||
public void should_return_false_for_flv()
|
||||
{
|
||||
_localEpisode.Path = @"C:\Test\some.show.s01e01.flv";
|
||||
|
||||
@ -93,7 +86,7 @@ public void should_use_runtime()
|
||||
}
|
||||
|
||||
[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);
|
||||
|
||||
@ -101,7 +94,7 @@ public void should_return_false_if_runtime_is_less_than_minimum()
|
||||
}
|
||||
|
||||
[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);
|
||||
|
||||
|
@ -185,7 +185,7 @@ private bool ShouldDeleteFolder(DirectoryInfo directoryInfo)
|
||||
if (!_sampleService.IsSample(series, quality, videoFile, size,
|
||||
episodeParseResult.SeasonNumber))
|
||||
{
|
||||
_logger.Warn("Non-sample file has not been imported: [{0}]", videoFile);
|
||||
_logger.Warn("Non-sample file detected: [{0}]", videoFile);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -36,12 +36,6 @@ public static long SampleSizeLimit
|
||||
|
||||
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)
|
||||
{
|
||||
_logger.Debug("Special, skipping sample check");
|
||||
|
Loading…
Reference in New Issue
Block a user