From 78551d166a98eabe0f10c43b9fbb486a74887275 Mon Sep 17 00:00:00 2001 From: crobibero Date: Mon, 9 Nov 2020 06:10:16 -0700 Subject: [PATCH] Don't throw exception if name is null --- Emby.Naming/Video/CleanDateTimeParser.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs index 579c9e91e1..f05d540f8b 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 cleanDateTimeRegexes) { CleanDateTimeResult result = new CleanDateTimeResult(name); + if (string.IsNullOrEmpty(name)) + { + return result; + } + var len = cleanDateTimeRegexes.Count; for (int i = 0; i < len; i++) {