aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Collections
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-11-27 08:49:52 -0700
committerCody Robibero <cody@robibe.ro>2022-11-27 08:49:52 -0700
commit4e34c428d8ed8753af0fa81a8833ac92a7d2f5ac (patch)
tree29fbe5f7355bc7dfe96a7787df34dec8fe75597d /Emby.Server.Implementations/Collections
parent5787ab15dc297da6d2e1ec984ccf19751ed85db6 (diff)
parentd4bd72049b4609582fb57f63134bee58327bc0cc (diff)
Merge branch 'master' into fix-fmp4-flac-opus
Diffstat (limited to 'Emby.Server.Implementations/Collections')
-rw-r--r--Emby.Server.Implementations/Collections/CollectionManager.cs8
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);