aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Collections/CollectionManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-08-13 16:21:10 -0400
committerGitHub <noreply@github.com>2017-08-13 16:21:10 -0400
commitdc578f3742b474bd85d556299a6b2763f4d9acda (patch)
treecc4a8d1de140ece77160349e51a64857656ab373 /Emby.Server.Implementations/Collections/CollectionManager.cs
parentf6ed934a7e32bf10c3a141773d713bf3b19e784f (diff)
parent7f200f057d33e3ef52b1b1b1bf1767577295317e (diff)
Merge pull request #2815 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Collections/CollectionManager.cs')
-rw-r--r--Emby.Server.Implementations/Collections/CollectionManager.cs9
1 files changed, 6 insertions, 3 deletions
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();