Fixed errors in MatchesFolderSpecification and tests.
This commit is contained in:
parent
c677736a8f
commit
fd1064cb69
|
@ -20,7 +20,14 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
.With(l => l.Path = @"C:\Test\Unsorted\Series.Title.S01E01.720p.HDTV-Sonarr\S01E05.mkv".AsOsAgnostic())
|
||||
.With(l => l.FileEpisodeInfo =
|
||||
Builder<ParsedEpisodeInfo>.CreateNew()
|
||||
.With(p => p.EpisodeNumbers = new[] {5})
|
||||
.With(p => p.EpisodeNumbers = new[] { 5 })
|
||||
.With(p => p.SeasonNumber == 1)
|
||||
.With(p => p.FullSeason = false)
|
||||
.Build())
|
||||
.With(l => l.FolderEpisodeInfo =
|
||||
Builder<ParsedEpisodeInfo>.CreateNew()
|
||||
.With(p => p.EpisodeNumbers = new[] { 1 })
|
||||
.With(p => p.SeasonNumber == 1)
|
||||
.With(p => p.FullSeason = false)
|
||||
.Build())
|
||||
.Build();
|
||||
|
@ -38,6 +45,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
public void should_be_accepted_if_folder_name_is_not_parseable()
|
||||
{
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title\S01E01.mkv".AsOsAgnostic();
|
||||
_localEpisode.FolderEpisodeInfo = null;
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
@ -46,6 +54,8 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
|||
public void should_should_be_accepted_for_full_season()
|
||||
{
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01\S01E01.mkv".AsOsAgnostic();
|
||||
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new int[0];
|
||||
_localEpisode.FolderEpisodeInfo.FullSeason = true;
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
|
|||
return Decision.Accept();
|
||||
}
|
||||
|
||||
var folderInfo = localEpisode.FileEpisodeInfo;
|
||||
var folderInfo = localEpisode.FolderEpisodeInfo;
|
||||
|
||||
if (folderInfo != null && folderInfo.IsPossibleSceneSeasonSpecial)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue