diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-01-08 22:34:09 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-01-08 22:34:09 -0500 |
| commit | aff870aaafc29b08127f7ea62e96ba8a3a60c0f8 (patch) | |
| tree | b93c872efb53cdd563226f3dd8c3831292b472e1 /MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | |
| parent | baf5e0c18b9c3daf168bd4f39b167e059ce47736 (diff) | |
search ignore accent chars
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 10 |
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; } |
