diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-05-06 20:49:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-06 20:49:19 +0200 |
| commit | 33ed52b8ee25e1fae4763a26337b838dc9782b26 (patch) | |
| tree | ee68da202f604eef267254ea8c689965098b1c3e /Emby.Server.Implementations/IO/LibraryMonitor.cs | |
| parent | aa96ff42e616ecf5638a8f1e2e8459b94513c528 (diff) | |
| parent | d1ab428476f961426841a0561036c59c3b93878e (diff) | |
Merge branch 'master' into feature/season-provider-id-from-path
Diffstat (limited to 'Emby.Server.Implementations/IO/LibraryMonitor.cs')
| -rw-r--r-- | Emby.Server.Implementations/IO/LibraryMonitor.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index 7cff2a25b6..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,19 +48,23 @@ 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); } /// <inheritdoc /> @@ -353,7 +358,7 @@ namespace Emby.Server.Implementations.IO } var fileInfo = _fileSystem.GetFileSystemInfo(path); - if (DotIgnoreIgnoreRule.IsIgnored(fileInfo, null)) + if (_dotIgnoreIgnoreRule.ShouldIgnore(fileInfo, null)) { return; } |
