aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-09 06:10:16 -0700
committercrobibero <cody@robibe.ro>2020-11-09 06:10:16 -0700
commit78551d166a98eabe0f10c43b9fbb486a74887275 (patch)
treea5930ba75cbc8ff0cfe2169dd07f39e67dfaf01f
parent363d41f9435e5dbdc8e933690cff66f89d3808fc (diff)
Don't throw exception if name is null
-rw-r--r--Emby.Naming/Video/CleanDateTimeParser.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index 579c9e91e..f05d540f8 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -15,6 +15,11 @@ namespace Emby.Naming.Video
public static CleanDateTimeResult Clean(string name, IReadOnlyList<Regex> cleanDateTimeRegexes)
{
CleanDateTimeResult result = new CleanDateTimeResult(name);
+ if (string.IsNullOrEmpty(name))
+ {
+ return result;
+ }
+
var len = cleanDateTimeRegexes.Count;
for (int i = 0; i < len; i++)
{