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/LibraryController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Jellyfin.Api/Controllers/LibraryController.cs') diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs index 3b4e80ff3..64df4c4f0 100644 --- a/Jellyfin.Api/Controllers/LibraryController.cs +++ b/Jellyfin.Api/Controllers/LibraryController.cs @@ -158,13 +158,13 @@ public class LibraryController : BaseJellyfinApiController return NotFound(); } - IEnumerable themeItems; + IReadOnlyList themeItems; while (true) { themeItems = item.GetThemeSongs(); - if (themeItems.Any() || !inheritFromParent) + if (themeItems.Count > 0 || !inheritFromParent) { break; } -- cgit v1.2.3