From 3feb3f81bfe848aa829e7c129bee3cd060c23c05 Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Tue, 30 Apr 2024 21:32:59 +0200 Subject: More efficient array creation (#11468) --- Jellyfin.Api/Controllers/LibraryStructureController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Jellyfin.Api/Controllers/LibraryStructureController.cs') diff --git a/Jellyfin.Api/Controllers/LibraryStructureController.cs b/Jellyfin.Api/Controllers/LibraryStructureController.cs index f685eeaa0..fb9f44d46 100644 --- a/Jellyfin.Api/Controllers/LibraryStructureController.cs +++ b/Jellyfin.Api/Controllers/LibraryStructureController.cs @@ -85,7 +85,7 @@ public class LibraryStructureController : BaseJellyfinApiController if (paths is not null && paths.Length > 0) { - libraryOptions.PathInfos = paths.Select(i => new MediaPathInfo(i)).ToArray(); + libraryOptions.PathInfos = Array.ConvertAll(paths, i => new MediaPathInfo(i)); } await _libraryManager.AddVirtualFolder(name, collectionType, libraryOptions, refreshLibrary).ConfigureAwait(false); -- cgit v1.2.3