Fixed: Don't reject standard/absolute numbering mismatch due to season number

pull/3061/head
Mark McDowall 5 years ago
parent c47e7cd91d
commit 894de923b9

@ -192,5 +192,19 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
Subject.IsSatisfiedBy(localEpisode, null).Accepted.Should().BeTrue();
}
[Test]
public void should_be_accepted_if_file_has_absolute_episode_number_and_folder_uses_standard()
{
_localEpisode.FileEpisodeInfo.SeasonNumber = 0;
_localEpisode.FileEpisodeInfo.AbsoluteEpisodeNumbers = 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().BeTrue();
}
}
}

@ -48,7 +48,13 @@ namespace NzbDrone.Core.MediaFiles.EpisodeImport.Specifications
_logger.Debug("No file ParsedEpisodeInfo, skipping check");
return Decision.Accept();
}
if (fileInfo.IsAbsoluteNumbering)
{
_logger.Debug("File uses absolute episode numbering, skipping check");
return Decision.Accept();
}
if (folderInfo.SeasonNumber != fileInfo.SeasonNumber)
{
return Decision.Reject("Season number {0} was unexpected considering the folder name {1}", fileInfo.SeasonNumber, folderInfo.ReleaseTitle);

Loading…
Cancel
Save