aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-02 16:21:47 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-02 16:21:47 -0500
commitb50fc351a12fa890b2d4ab6e71b7a4b609dd583c (patch)
tree77a54a812809682bd2c0a7e5c769ba54786534dc /MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
parent8369f16d667abf324324d9c567bff445a62013e1 (diff)
add null checks to video methods
Diffstat (limited to 'MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs')
-rw-r--r--MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
index 3cd38da45..079571ee9 100644
--- a/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
+++ b/MediaBrowser.Controller/Resolvers/EntityResolutionHelper.cs
@@ -66,6 +66,11 @@ namespace MediaBrowser.Controller.Resolvers
/// <returns><c>true</c> if [is multi part file] [the specified path]; otherwise, <c>false</c>.</returns>
public static bool IsMultiPartFile(string path)
{
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
return MultiFileRegex.Match(path).Success || MultiFolderRegex.Match(path).Success;
}
@@ -97,6 +102,11 @@ namespace MediaBrowser.Controller.Resolvers
/// <returns><c>true</c> if [is audio file] [the specified args]; otherwise, <c>false</c>.</returns>
public static bool IsAudioFile(string path)
{
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
var extension = Path.GetExtension(path);
if (string.IsNullOrEmpty(extension))
@@ -114,6 +124,11 @@ namespace MediaBrowser.Controller.Resolvers
/// <returns><c>true</c> if [is video file] [the specified path]; otherwise, <c>false</c>.</returns>
public static bool IsVideoFile(string path)
{
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
var extension = Path.GetExtension(path);
if (string.IsNullOrEmpty(extension))