diff options
| author | Niels van Velzen <nielsvanvelzen@users.noreply.github.com> | 2026-05-04 17:59:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-04 17:59:48 +0200 |
| commit | d359d2f7a865329ba10915dbd68dc1ab54450ffa (patch) | |
| tree | 03b52cf498f704668b74ab5de143f9b261c72db0 /Emby.Server.Implementations/IO/LibraryMonitor.cs | |
| parent | ba268cc3fbb9b2cde2bfb3e5d6074474b6904a0f (diff) | |
| parent | 0f6bab03eb29030bbe0f00ed32ad72f97e321e62 (diff) | |
Merge pull request #16166 from Shadowghost/ignore-caching
Implement ignore rule caching
Diffstat (limited to 'Emby.Server.Implementations/IO/LibraryMonitor.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/LibraryMonitor.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index 23bd5cf200..1bf0f8c76c 100644 --- a/Emby.Server.Implementations/IO/LibraryMonitor.cs +++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs @@ -21,6 +21,7 @@ namespace Emby.Server.Implementations.IO private readonly ILibraryManager _libraryManager; private readonly IServerConfigurationManager _configurationManager; private readonly IFileSystem _fileSystem; + private readonly DotIgnoreIgnoreRule _dotIgnoreIgnoreRule; /// <summary> /// The file system watchers. @@ -47,17 +48,20 @@ namespace Emby.Server.Implementations.IO /// <param name="configurationManager">The configuration manager.</param> /// <param name="fileSystem">The filesystem.</param> /// <param name="appLifetime">The <see cref="IHostApplicationLifetime"/>.</param> + /// <param name="dotIgnoreIgnoreRule">The .ignore rule handler.</param> public LibraryMonitor( ILogger<LibraryMonitor> logger, ILibraryManager libraryManager, IServerConfigurationManager configurationManager, IFileSystem fileSystem, - IHostApplicationLifetime appLifetime) + IHostApplicationLifetime appLifetime, + DotIgnoreIgnoreRule dotIgnoreIgnoreRule) { _libraryManager = libraryManager; _logger = logger; _configurationManager = configurationManager; _fileSystem = fileSystem; + _dotIgnoreIgnoreRule = dotIgnoreIgnoreRule; appLifetime.ApplicationStarted.Register(Start); appLifetime.ApplicationStopping.Register(Stop); @@ -354,7 +358,7 @@ namespace Emby.Server.Implementations.IO } var fileInfo = _fileSystem.GetFileSystemInfo(path); - if (DotIgnoreIgnoreRule.IsIgnored(fileInfo, null)) + if (_dotIgnoreIgnoreRule.ShouldIgnore(fileInfo, null)) { return; } |
