aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-01-10 01:59:48 -0500
committerLuke <luke.pulverenti@gmail.com>2015-01-10 01:59:48 -0500
commit18b5168f05dc325985ac6a7b2b5b390fa4b12042 (patch)
tree7e440e3267895f7ce161ac5ae3d5723e0894bd5f /MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
parente3a1c13e7cc8c49eb66b395b4810339f41fdf6b3 (diff)
parente97848289600570b489b6fdb608014b383772523 (diff)
Merge pull request #971 from MediaBrowser/dev
3.0.5482.4
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;
}