1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

New: Ignore '.DS_Store' and '.unmanic' files

This commit is contained in:
Bogdan
2024-09-28 03:27:17 +03:00
committed by GitHub
parent 768af433d1
commit 2f0ca42341
2 changed files with 25 additions and 1 deletions
@@ -9,6 +9,8 @@ using NzbDrone.Common.Extensions;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MediaFiles.EpisodeImport;
using NzbDrone.Core.MediaFiles.Events;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.RootFolders;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Tv;
@@ -457,5 +459,27 @@ namespace NzbDrone.Core.Test.MediaFiles.DiskScanServiceTests
Mocker.GetMock<IMakeImportDecision>()
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series, false), Times.Once());
}
[Test]
public void should_not_scan_excluded_files()
{
GivenSeriesFolder();
GivenFiles(new List<string>
{
Path.Combine(_series.Path, ".DS_Store").AsOsAgnostic(),
Path.Combine(_series.Path, ".unmanic").AsOsAgnostic(),
Path.Combine(_series.Path, ".unmanic.part").AsOsAgnostic(),
Path.Combine(_series.Path, "24 The Status Quo Combustion.mkv").AsOsAgnostic()
});
Subject.Scan(_series);
Mocker.GetMock<IMakeImportDecision>()
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series, false), Times.Once());
Mocker.GetMock<IEventAggregator>()
.Verify(v => v.PublishEvent(It.Is<SeriesScannedEvent>(c => c.Series != null && c.PossibleExtraFiles.Count == 0)), Times.Once());
}
}
}