From e7425e6205fd9accb768084503c5174e820eaf7d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 10 Aug 2017 14:01:31 -0400 Subject: revert servicestack.text update --- Emby.Server.Implementations/Collections/CollectionManager.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs') diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 4e5d344a3..5b168f6cc 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -12,6 +12,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.IO; +using MediaBrowser.Model.Extensions; namespace Emby.Server.Implementations.Collections { @@ -190,7 +191,9 @@ namespace Emby.Server.Implementations.Collections if (list.Count > 0) { - collection.LinkedChildren.AddRange(list); + var newList = collection.LinkedChildren.ToList(); + newList.AddRange(list); + collection.LinkedChildren = newList.ToArray(newList.Count); collection.UpdateRatingToContent(); @@ -241,9 +244,9 @@ namespace Emby.Server.Implementations.Collections } } - foreach (var child in list) + if (list.Count > 0) { - collection.LinkedChildren.Remove(child); + collection.LinkedChildren = collection.LinkedChildren.Except(list).ToArray(); } collection.UpdateRatingToContent(); -- cgit v1.2.3