diff options
| author | Bond-009 <bond.009@outlook.com> | 2022-10-30 14:19:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-30 14:19:07 +0100 |
| commit | 4c61bf1bdb16f6cb9136f22105b9411d42298c44 (patch) | |
| tree | dd3cdea1d0fc3db215f2855199d3ee9a6abcd26a /Emby.Server.Implementations/Collections/CollectionManager.cs | |
| parent | b67ddc55c22423da93d73dd0426c56c1588fbc60 (diff) | |
| parent | c2c286be6ed1ed33cb78aaebd9f14dc7f19fe0d1 (diff) | |
Merge pull request #8618 from jgriff6/remove-tolists
Diffstat (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Collections/CollectionManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 5fc2e39a7..187e0c9b3 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -232,10 +232,10 @@ namespace Emby.Server.Implementations.Collections if (list.Count > 0) { - var newList = collection.LinkedChildren.ToList(); - newList.AddRange(list); - collection.LinkedChildren = newList.ToArray(); - + LinkedChild[] newChildren = new LinkedChild[collection.LinkedChildren.Length + list.Count]; + collection.LinkedChildren.CopyTo(newChildren, 0); + list.CopyTo(newChildren, collection.LinkedChildren.Length); + collection.LinkedChildren = newChildren; collection.UpdateRatingToItems(linkedChildrenList); await collection.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false); |
