diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-02-06 20:38:42 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-02-09 15:57:42 +0100 |
| commit | a6a4cd5667fbb5a793cb9e551ce9c9a9bfb0d44b (patch) | |
| tree | a30d6c2f920c58287f9905f19b150ad06672e120 /Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | |
| parent | f1ef0b0b4c54b2c370704aacb13a37e9abd4a6a0 (diff) | |
Removed some unused fields
Diffstat (limited to 'Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index 80f746c7a..c644d13ea 100644 --- a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; using MediaBrowser.Controller.Entities; @@ -7,7 +6,6 @@ using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.Library { @@ -16,16 +14,14 @@ namespace Emby.Server.Implementations.Library /// </summary> public class CoreResolutionIgnoreRule : IResolverIgnoreRule { - private readonly IFileSystem _fileSystem; private readonly ILibraryManager _libraryManager; - private readonly ILogger _logger; private bool _ignoreDotPrefix; /// <summary> /// Any folder named in this list will be ignored - can be added to at runtime for extensibility /// </summary> - public static readonly Dictionary<string, string> IgnoreFolders = new List<string> + public static readonly string[] IgnoreFolders = { "metadata", "ps3_update", @@ -50,13 +46,11 @@ namespace Emby.Server.Implementations.Library // macos ".AppleDouble" - }.ToDictionary(i => i, StringComparer.OrdinalIgnoreCase); + }; - public CoreResolutionIgnoreRule(IFileSystem fileSystem, ILibraryManager libraryManager, ILogger logger) + public CoreResolutionIgnoreRule(ILibraryManager libraryManager) { - _fileSystem = fileSystem; _libraryManager = libraryManager; - _logger = logger; _ignoreDotPrefix = Environment.OSVersion.Platform != PlatformID.Win32NT; } @@ -117,7 +111,7 @@ namespace Emby.Server.Implementations.Library if (fileInfo.IsDirectory) { // Ignore any folders in our list - if (IgnoreFolders.ContainsKey(filename)) + if (IgnoreFolders.Contains(filename, StringComparer.OrdinalIgnoreCase)) { return true; } |
