From 19c5c95f4e2de29ae090a992155c3d539a0ad6ec Mon Sep 17 00:00:00 2001 From: gnattu Date: Tue, 19 Nov 2024 15:43:20 -0500 Subject: [PATCH] Backport pull request #12949 from jellyfin/release-10.10.z Fix json array string writer in JsonDelimitedArrayConverter Original-merge: 3089e9e40aea4bfe2b99d8b8bd5fdf1dd9d37984 Merged-by: crobibero Backported-by: Joshua M. Boniface --- .../Json/Converters/JsonDelimitedArrayConverter.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/Jellyfin.Extensions/Json/Converters/JsonDelimitedArrayConverter.cs b/src/Jellyfin.Extensions/Json/Converters/JsonDelimitedArrayConverter.cs index cdeaf29b08..c53ef275b3 100644 --- a/src/Jellyfin.Extensions/Json/Converters/JsonDelimitedArrayConverter.cs +++ b/src/Jellyfin.Extensions/Json/Converters/JsonDelimitedArrayConverter.cs @@ -70,24 +70,11 @@ namespace Jellyfin.Extensions.Json.Converters writer.WriteStartArray(); if (value.Length > 0) { - var toWrite = value.Length - 1; foreach (var it in value) { - var wrote = false; if (it is not null) { writer.WriteStringValue(it.ToString()); - wrote = true; - } - - if (toWrite > 0) - { - if (wrote) - { - writer.WriteStringValue(Delimiter.ToString()); - } - - toWrite--; } } }