diff --git a/Emby.Naming/Video/Format3DParser.cs b/Emby.Naming/Video/Format3DParser.cs
index 190ff99184..0890899894 100644
--- a/Emby.Naming/Video/Format3DParser.cs
+++ b/Emby.Naming/Video/Format3DParser.cs
@@ -17,17 +17,17 @@ namespace Emby.Naming.Video
/// Path to file.
/// The naming options.
/// Returns object.
- public static Format3DResult Parse(string path, NamingOptions namingOptions)
+ public static Format3DResult Parse(ReadOnlySpan path, NamingOptions namingOptions)
{
int oldLen = namingOptions.VideoFlagDelimiters.Length;
- var delimiters = new char[oldLen + 1];
- namingOptions.VideoFlagDelimiters.CopyTo(delimiters, 0);
+ Span delimiters = stackalloc char[oldLen + 1];
+ namingOptions.VideoFlagDelimiters.AsSpan().CopyTo(delimiters);
delimiters[oldLen] = ' ';
return Parse(path, delimiters, namingOptions);
}
- private static Format3DResult Parse(ReadOnlySpan path, char[] delimiters, NamingOptions namingOptions)
+ private static Format3DResult Parse(ReadOnlySpan path, ReadOnlySpan delimiters, NamingOptions namingOptions)
{
foreach (var rule in namingOptions.Format3DRules)
{
@@ -42,7 +42,7 @@ namespace Emby.Naming.Video
return _defaultResult;
}
- private static Format3DResult Parse(ReadOnlySpan path, Format3DRule rule, char[] delimiters)
+ private static Format3DResult Parse(ReadOnlySpan path, Format3DRule rule, ReadOnlySpan delimiters)
{
bool is3D = false;
string? format3D = null;