From 5a5ec56328ef3a6ac551543e17a0f0b0e0492cef Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 4 Jan 2015 09:34:15 -0500 Subject: adjust imdb id parsing --- MediaBrowser.Server.Implementations/Library/PathExtensions.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/PathExtensions.cs') diff --git a/MediaBrowser.Server.Implementations/Library/PathExtensions.cs b/MediaBrowser.Server.Implementations/Library/PathExtensions.cs index 822f41da2..6c0e3237e 100644 --- a/MediaBrowser.Server.Implementations/Library/PathExtensions.cs +++ b/MediaBrowser.Server.Implementations/Library/PathExtensions.cs @@ -33,13 +33,12 @@ namespace MediaBrowser.Server.Implementations.Library return str.Substring(start, end - start); } // for imdbid we also accept pattern matching - if (attrib == "imdbid") + if (string.Equals(attrib, "imdbid", StringComparison.OrdinalIgnoreCase)) { - Regex imdbPattern = new Regex("tt\\d{7}"); - var m = imdbPattern.Match(str); - return m.Success ? m.Value : null; + var m = Regex.Match(str, "tt\\d{7}", RegexOptions.IgnoreCase); + return m.Success ? m.Value : null; } - + return null; } } -- cgit v1.2.3