mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-25 22:46:31 -04:00
Fixed: Season mismatch between file and folder not rejecting import
This commit is contained in:
+29
@@ -134,6 +134,35 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_rejected_if_file_and_folder_do_not_have_episodes_from_the_same_partial_season()
|
||||
{
|
||||
_localEpisode.FileEpisodeInfo.SeasonNumber = 2;
|
||||
_localEpisode.FileEpisodeInfo.EpisodeNumbers = new[] { 1 };
|
||||
|
||||
_localEpisode.FolderEpisodeInfo.SeasonNumber = 1;
|
||||
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
|
||||
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S02E01.mkv".AsOsAgnostic();
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_accepted_if_file_and_folder_have_episodes_from_the_same_season()
|
||||
{
|
||||
_localEpisode.FileEpisodeInfo.SeasonNumber = 1;
|
||||
_localEpisode.FileEpisodeInfo.EpisodeNumbers = new[] { 1 };
|
||||
|
||||
_localEpisode.FolderEpisodeInfo.FullSeason = true;
|
||||
_localEpisode.FolderEpisodeInfo.SeasonNumber = 1;
|
||||
_localEpisode.FolderEpisodeInfo.EpisodeNumbers = new[] { 1, 2 };
|
||||
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01.720p.HDTV-Sonarr\S01E01.mkv".AsOsAgnostic();
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_accepted_if_both_file_and_folder_info_map_to_same_special()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user