aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/PathExtensions.cs
diff options
context:
space:
mode:
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;
}
}