From ee66c745274ae0b24022ec077e39d6bb9d6d6469 Mon Sep 17 00:00:00 2001 From: gnattu Date: Tue, 19 Nov 2024 15:43:22 -0500 Subject: [PATCH] Backport pull request #12962 from jellyfin/release-10.10.z Always consider null char as delimiter for ID3v2 Original-merge: 97dc02b1632c3c329a181c816ff2c6dc84319732 Merged-by: crobibero Backported-by: Joshua M. Boniface --- MediaBrowser.Model/Extensions/LibraryOptionsExtension.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Model/Extensions/LibraryOptionsExtension.cs b/MediaBrowser.Model/Extensions/LibraryOptionsExtension.cs index 4a814f22a3..b088cfb53b 100644 --- a/MediaBrowser.Model/Extensions/LibraryOptionsExtension.cs +++ b/MediaBrowser.Model/Extensions/LibraryOptionsExtension.cs @@ -18,7 +18,7 @@ public static class LibraryOptionsExtension { ArgumentNullException.ThrowIfNull(options); - return options.CustomTagDelimiters.Select(x => + var delimiterList = options.CustomTagDelimiters.Select(x => { var isChar = char.TryParse(x, out var c); if (isChar) @@ -27,6 +27,8 @@ public static class LibraryOptionsExtension } return null; - }).Where(x => x is not null).Select(x => x!.Value).ToArray(); + }).Where(x => x is not null).Select(x => x!.Value).ToList(); + delimiterList.Add('\0'); + return delimiterList.ToArray(); } }