mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Fixed errors in MatchesFolderSpecification and tests.
This commit is contained in:
parent
c677736a8f
commit
fd1064cb69
@ -21,6 +21,13 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
||||
.With(l => l.FileEpisodeInfo =
|
||||
Builder<ParsedEpisodeInfo>.CreateNew()
|
||||
.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
Block a user