aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/PathExtensions.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-04 09:34:15 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-01-04 09:34:15 -0500
commit5a5ec56328ef3a6ac551543e17a0f0b0e0492cef (patch)
treefb353f84d3303a650be8e1444e7dbecee35fbfc0 /MediaBrowser.Server.Implementations/Library/PathExtensions.cs
parent3eb4ca598c44be54ec2d98773ff1f66c529b1156 (diff)
adjust imdb id parsing
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/PathExtensions.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/PathExtensions.cs9
1 files changed, 4 insertions, 5 deletions
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;
}
}