aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2020-11-09 15:49:56 +0100
committerGitHub <noreply@github.com>2020-11-09 15:49:56 +0100
commit296e534f670df9069e8cb50683a964ea2a5cdc37 (patch)
treee5ee45d0fcbe602e343f4579a2e97badc4be9b15
parentab285c2202bb182e81077816557e5829db7f14c3 (diff)
parent78551d166a98eabe0f10c43b9fbb486a74887275 (diff)
Merge pull request #4448 from crobibero/regex-error
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++)
{