Fixed: Don't ignore filenames that start with periods

pull/110/head
Qstick 7 years ago
parent a1bf1b99f5
commit 2dddf8cb33

@ -250,6 +250,22 @@ namespace NzbDrone.Core.Test.MediaFiles.DiskScanServiceTests
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 4), _artist), Times.Once());
}
[Test]
public void should_scan_files_that_start_with_period()
{
GivenArtistFolder();
GivenFiles(new List<string>
{
Path.Combine(_artist.Path, "Album 1", ".t01.mp3").AsOsAgnostic()
});
Subject.Scan(_artist);
Mocker.GetMock<IMakeImportDecision>()
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _artist), Times.Once());
}
[Test]
public void should_not_scan_subfolders_that_start_with_period()
{

@ -59,7 +59,7 @@ namespace NzbDrone.Core.MediaFiles
_eventAggregator = eventAggregator;
_logger = logger;
}
private static readonly Regex ExcludedSubFoldersRegex = new Regex(@"(?:\\|\/|^)(?:extras|@eadir|extrafanart|plex versions|\.[^\\/]+)(?:\\|\/|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ExcludedSubFoldersRegex = new Regex(@"(?:\\|\/|^)(?:extras|@eadir|extrafanart|plex versions|\.[^\\/]+)(?:\\|\/)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ExcludedFilesRegex = new Regex(@"^\._|^Thumbs\.db$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public void Scan(Artist artist)

Loading…
Cancel
Save