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

@@ -303,8 +303,8 @@ namespace Emby.Server.Implementations.Library
{
// Handle situations with the grouping setting, e.g. movies showing up in tv, etc.
// Thanks to mixed content libraries included in the UserView
var hasCollectionType = parents.OfType<UserView>().ToArray();
if (hasCollectionType.Length > 0)
var hasCollectionType = parents.OfType<UserView>().ToList();
if (hasCollectionType.Count > 0)
{
if (hasCollectionType.All(i => i.CollectionType == CollectionType.movies))
{