mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-29 03:05:49 +00:00
Fixed: Don't ignore filenames that start with periods
This commit is contained in:
parent
50b01d8d00
commit
8bc55c5305
2 changed files with 19 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using FizzWare.NBuilder;
|
using FizzWare.NBuilder;
|
||||||
|
@ -269,6 +269,22 @@ namespace NzbDrone.Core.Test.MediaFiles.DiskScanServiceTests
|
||||||
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series), Times.Once());
|
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series), Times.Once());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_scan_files_that_start_with_period()
|
||||||
|
{
|
||||||
|
GivenSeriesFolder();
|
||||||
|
|
||||||
|
GivenFiles(new List<string>
|
||||||
|
{
|
||||||
|
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), Times.Once());
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_not_scan_subfolder_of_season_folder_that_starts_with_a_period()
|
public void should_not_scan_subfolder_of_season_folder_that_starts_with_a_period()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -60,7 +60,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
_logger = logger;
|
_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);
|
private static readonly Regex ExcludedFilesRegex = new Regex(@"^\._|^Thumbs\.db$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
public void Scan(Series series)
|
public void Scan(Series series)
|
||||||
|
|
Loading…
Reference in a new issue