More efficient array creation (#11468)

This commit is contained in:
Bond-009
2024-04-30 21:32:59 +02:00
committed by GitHub
parent 5dc6bb4910
commit 3feb3f81bf
25 changed files with 55 additions and 131 deletions

View File

@@ -158,13 +158,13 @@ public class LibraryController : BaseJellyfinApiController
return NotFound();
}
IEnumerable<BaseItem> themeItems;
IReadOnlyList<BaseItem> themeItems;
while (true)
{
themeItems = item.GetThemeSongs();
if (themeItems.Any() || !inheritFromParent)
if (themeItems.Count > 0 || !inheritFromParent)
{
break;
}