diff options
| author | jgriff6 <74262798+jgriff6@users.noreply.github.com> | 2022-10-25 01:40:47 +0100 |
|---|---|---|
| committer | jgriff6 <74262798+jgriff6@users.noreply.github.com> | 2022-10-25 02:27:13 +0100 |
| commit | 08e71010ae3370cb51068eb0215d53f82019fbca (patch) | |
| tree | 49e2cac4afc8358f9a19632bdca22d0d2f5d7dd2 /Emby.Server.Implementations/Collections/CollectionManager.cs | |
| parent | 5cd37686ac43c5595e63dfc47bfaf339f2be3271 (diff) | |
Clean up some ToList usage
Diffstat (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Collections/CollectionManager.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 213c3dccc..187e0c9b3 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -232,7 +232,10 @@ namespace Emby.Server.Implementations.Collections if (list.Count > 0) { - collection.LinkedChildren = collection.LinkedChildren.Concat(list).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); |
