aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-08 22:34:09 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-08 22:34:09 -0500
commitaff870aaafc29b08127f7ea62e96ba8a3a60c0f8 (patch)
treeb93c872efb53cdd563226f3dd8c3831292b472e1 /MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
parentbaf5e0c18b9c3daf168bd4f39b167e059ce47736 (diff)
search ignore accent chars
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
index 1628ccc32..1771bbdb2 100644
--- a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
+++ b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Common.IO;
+using MediaBrowser.Common.Extensions;
+using MediaBrowser.Common.IO;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
@@ -114,7 +115,12 @@ namespace MediaBrowser.Server.Implementations.Library
}
// Ignore samples
- if (filename.IndexOf(".sample.", StringComparison.OrdinalIgnoreCase) != -1)
+ var sampleFilename = " " + filename.Replace(".", " ", StringComparison.OrdinalIgnoreCase)
+ .Replace("-", " ", StringComparison.OrdinalIgnoreCase)
+ .Replace("_", " ", StringComparison.OrdinalIgnoreCase)
+ .Replace("!", " ", StringComparison.OrdinalIgnoreCase);
+
+ if (sampleFilename.IndexOf(" sample ", StringComparison.OrdinalIgnoreCase) != -1)
{
return true;
}