mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed: Don't scan subfolders in series folders that start with a period
This commit is contained in:
parent
0d3c467c50
commit
6054dd8ee6
@ -143,5 +143,24 @@ public void should_scan_extras_series_and_subfolders()
|
||||
Mocker.GetMock<IMakeImportDecision>()
|
||||
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 4), _series, false, (QualityModel)null), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_scan_subfolders_that_start_with_period()
|
||||
{
|
||||
GivenParentFolderExists();
|
||||
|
||||
GivenFiles(new List<string>
|
||||
{
|
||||
Path.Combine(_series.Path, ".@__thumb", "file1.mkv").AsOsAgnostic(),
|
||||
Path.Combine(_series.Path, ".@__THUMB", "file2.mkv").AsOsAgnostic(),
|
||||
Path.Combine(_series.Path, ".hidden", "file2.mkv").AsOsAgnostic(),
|
||||
Path.Combine(_series.Path, "Season 1", "s01e01.mkv").AsOsAgnostic()
|
||||
});
|
||||
|
||||
Subject.Scan(_series);
|
||||
|
||||
Mocker.GetMock<IMakeImportDecision>()
|
||||
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series, false, (QualityModel)null), Times.Once());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ public DiskScanService(IDiskProvider diskProvider,
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
private static readonly Regex ExcludedSubFoldersRegex = new Regex(@"(extras|\.appledouble)(?:\\|\/)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private static readonly Regex ExcludedSubFoldersRegex = new Regex(@"(extras|^\..+)(?:\\|\/)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
public void Scan(Series series)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user