aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library
diff options
context:
space:
mode:
authorAndrew Rabert <6550543+nvllsvm@users.noreply.github.com>2019-02-08 00:08:35 -0500
committerGitHub <noreply@github.com>2019-02-08 00:08:35 -0500
commitee3a4531a00d0577fca6807a5a4ab031f7987d8e (patch)
tree244b35a2e15c7278630ef34599976fbce57c8ac9 /Emby.Server.Implementations/Library
parentd6d9fce898ce058229a6a88800856424180bd892 (diff)
parent70c85925af31ee341f87fced39a67ab7fb4eed77 (diff)
Merge pull request #831 from Bond-009/hashset
Move some arrays to generics
Diffstat (limited to 'Emby.Server.Implementations/Library')
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs7
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('.'));
}
}