diff --git a/Emby.Naming/Video/CleanStringParser.cs b/Emby.Naming/Video/CleanStringParser.cs
index deeea4ddac..bd7553a91c 100644
--- a/Emby.Naming/Video/CleanStringParser.cs
+++ b/Emby.Naming/Video/CleanStringParser.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
namespace Emby.Naming.Video
@@ -17,7 +16,7 @@ namespace Emby.Naming.Video
/// List of regex to parse name and year from.
/// Parsing result string.
/// True if parsing was successful.
- public static bool TryClean(string name, IReadOnlyList expressions, [NotNullWhen(true)] out ReadOnlySpan newName)
+ public static bool TryClean(string name, IReadOnlyList expressions, out ReadOnlySpan newName)
{
var len = expressions.Count;
for (int i = 0; i < len; i++)
@@ -32,11 +31,11 @@ namespace Emby.Naming.Video
return false;
}
- private static bool TryClean(string name, Regex expression, [NotNullWhen(true)] out ReadOnlySpan newName)
+ private static bool TryClean(string name, Regex expression, out ReadOnlySpan newName)
{
if (string.IsNullOrEmpty(name))
{
- newName = null;
+ newName = ReadOnlySpan.Empty;
return false;
}
@@ -48,7 +47,7 @@ namespace Emby.Naming.Video
return true;
}
- newName = string.Empty;
+ newName = ReadOnlySpan.Empty;
return false;
}
}
diff --git a/Emby.Naming/Video/VideoResolver.cs b/Emby.Naming/Video/VideoResolver.cs
index d845d2ca6e..619d1520e4 100644
--- a/Emby.Naming/Video/VideoResolver.cs
+++ b/Emby.Naming/Video/VideoResolver.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using Emby.Naming.Common;
@@ -147,7 +146,7 @@ namespace Emby.Naming.Video
/// Raw name.
/// Clean name.
/// True if cleaning of name was successful.
- public bool TryCleanString(string name, [NotNullWhen(true)] out ReadOnlySpan newName)
+ public bool TryCleanString(string name, out ReadOnlySpan newName)
{
return CleanStringParser.TryClean(name, _options.CleanStringRegexes, out newName);
}