diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-02-06 21:31:41 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2019-02-06 22:58:12 +0100 |
| commit | 70c85925af31ee341f87fced39a67ab7fb4eed77 (patch) | |
| tree | 1e4e2116733b444a9024f922369aeaf0575c91c9 /Emby.Server.Implementations/Library/Resolvers | |
| parent | 0ef2b46106937c8acbab8e2a6a1e08affb823d31 (diff) | |
Move some arrays to generics
Diffstat (limited to 'Emby.Server.Implementations/Library/Resolvers')
| -rw-r--r-- | Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs index 9de766767..a3298c580 100644 --- a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.IO; using System.Linq; using MediaBrowser.Controller.Drawing; @@ -85,7 +86,7 @@ namespace Emby.Server.Implementations.Library.Resolvers return false; } - private static readonly string[] IgnoreFiles = + private static readonly HashSet<string> IgnoreFiles = new HashSet<string>(StringComparer.OrdinalIgnoreCase) { "folder", "thumb", @@ -102,7 +103,7 @@ namespace Emby.Server.Implementations.Library.Resolvers { var filename = Path.GetFileNameWithoutExtension(path) ?? string.Empty; - if (IgnoreFiles.Contains(filename, StringComparer.OrdinalIgnoreCase)) + if (IgnoreFiles.Contains(filename)) { return false; } @@ -112,7 +113,7 @@ namespace Emby.Server.Implementations.Library.Resolvers return false; } - return imageProcessor.SupportedInputFormats.Contains((Path.GetExtension(path) ?? string.Empty).TrimStart('.'), StringComparer.OrdinalIgnoreCase); + return imageProcessor.SupportedInputFormats.Contains((Path.GetExtension(path) ?? string.Empty).TrimStart('.')); } } |
