mirror of
https://github.com/Radarr/Radarr
synced 2026-03-03 02:52:21 +01:00
Fixed: Regression with importing nested obfuscated directories.
Closes #2640
This commit is contained in:
parent
48126f55ed
commit
e9b11e55e9
4 changed files with 29 additions and 0 deletions
|
|
@ -29,6 +29,13 @@ public void Setup()
|
|||
};
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_if_no_fileinfo_available()
|
||||
{
|
||||
_localEpisode.FileEpisodeInfo = null;
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_file_contains_the_full_season()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,6 +50,15 @@ public void should_be_accepted_if_folder_name_is_not_parseable()
|
|||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_accepted_if_file_name_is_not_parseable()
|
||||
{
|
||||
_localEpisode.Path = @"C:\Test\Unsorted\Series.Title.S01E01\AFDAFD.mkv".AsOsAgnostic();
|
||||
_localEpisode.FileEpisodeInfo = null;
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode, null).Accepted.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_should_be_accepted_for_full_season()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ public FullSeasonSpecification(Logger logger)
|
|||
|
||||
public Decision IsSatisfiedBy(LocalEpisode localEpisode, DownloadClientItem downloadClientItem)
|
||||
{
|
||||
if (localEpisode.FileEpisodeInfo == null)
|
||||
{
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
if (localEpisode.FileEpisodeInfo.FullSeason)
|
||||
{
|
||||
_logger.Debug("Single episode file detected as containing all episodes in the season");
|
||||
|
|
|
|||
|
|
@ -34,11 +34,19 @@ public Decision IsSatisfiedBy(LocalEpisode localEpisode, DownloadClientItem down
|
|||
|
||||
if (folderInfo == null)
|
||||
{
|
||||
_logger.Debug("No folder ParsedEpisodeInfo, skipping check");
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
if (fileInfo == null)
|
||||
{
|
||||
_logger.Debug("No file ParsedEpisodeInfo, skipping check");
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
if (!folderInfo.EpisodeNumbers.Any())
|
||||
{
|
||||
_logger.Debug("No episode numbers in folder ParsedEpisodeInfo, skipping check");
|
||||
return Decision.Accept();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue