1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Ignore @eaDir inside Series folders

This commit is contained in:
Mark McDowall 2015-04-27 17:07:22 -07:00
parent b1a0e759ef
commit 27246de623
2 changed files with 19 additions and 6 deletions

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FizzWare.NBuilder;
@ -7,10 +6,7 @@
using NUnit.Framework;
using NzbDrone.Common.Disk;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.Commands;
using NzbDrone.Core.MediaFiles.EpisodeImport;
using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
using NzbDrone.Test.Common;
@ -182,5 +178,22 @@ public void should_not_scan_subfolder_of_season_folder_that_starts_with_a_period
Mocker.GetMock<IMakeImportDecision>()
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series), Times.Once());
}
[Test]
public void should_not_scan_Ssynology_eaDir()
{
GivenParentFolderExists();
GivenFiles(new List<string>
{
Path.Combine(_series.Path, "@eaDir", "file1.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), Times.Once());
}
}
}

View File

@ -58,7 +58,7 @@ public DiskScanService(IDiskProvider diskProvider,
_logger = logger;
}
private static readonly Regex ExcludedSubFoldersRegex = new Regex(@"(extras)(?:\\|\/)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ExcludedSubFoldersRegex = new Regex(@"(extras|@eadir)(?:\\|\/)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Regex ExcludedFoldersRegex = new Regex(@"(?:\\|\/)(\..+)(?:\\|\/)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public void Scan(Series series)