diff options
| author | Max Git <rotvel@gmail.com> | 2020-07-02 23:50:13 +0200 |
|---|---|---|
| committer | Max Git <rotvel@gmail.com> | 2020-07-02 23:50:13 +0200 |
| commit | 3588ee5229b76bca9417813e208e86492e06d609 (patch) | |
| tree | 01131e5776246875ed5a538a71b2bd8a7f1c0c6f /Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | |
| parent | 1c84a31b22fa8708ad3c0c901abda4aac903f28d (diff) | |
| parent | 5caddb242beba3cbaa0c1ca94f7fa07f73309ddb (diff) | |
Merge branch 'master' into feature/ffmpeg-version-check
Diffstat (limited to 'Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index e140009ea..77b2c0a69 100644 --- a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using MediaBrowser.Controller; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; @@ -13,19 +14,28 @@ namespace Emby.Server.Implementations.Library public class CoreResolutionIgnoreRule : IResolverIgnoreRule { private readonly ILibraryManager _libraryManager; + private readonly IServerApplicationPaths _serverApplicationPaths; /// <summary> /// Initializes a new instance of the <see cref="CoreResolutionIgnoreRule"/> class. /// </summary> /// <param name="libraryManager">The library manager.</param> - public CoreResolutionIgnoreRule(ILibraryManager libraryManager) + /// <param name="serverApplicationPaths">The server application paths.</param> + public CoreResolutionIgnoreRule(ILibraryManager libraryManager, IServerApplicationPaths serverApplicationPaths) { _libraryManager = libraryManager; + _serverApplicationPaths = serverApplicationPaths; } /// <inheritdoc /> public bool ShouldIgnore(FileSystemMetadata fileInfo, BaseItem parent) { + // Don't ignore application folders + if (fileInfo.FullName.Contains(_serverApplicationPaths.RootFolderPath, StringComparison.InvariantCulture)) + { + return false; + } + // Don't ignore top level folders if (fileInfo.IsDirectory && parent is AggregateFolder) { |
