#712 - Support grouping multiple versions of a movie

This commit is contained in:
Luke Pulverenti
2014-03-16 00:23:58 -04:00
parent 4e6d306d00
commit b36aea4ff7
12 changed files with 216 additions and 38 deletions

View File

@@ -111,6 +111,7 @@ namespace MediaBrowser.Server.Implementations.Collections
}
var list = new List<LinkedChild>();
var currentLinkedChildren = collection.GetLinkedChildren().ToList();
foreach (var itemId in ids)
{
@@ -121,7 +122,7 @@ namespace MediaBrowser.Server.Implementations.Collections
throw new ArgumentException("No item exists with the supplied Id");
}
if (collection.LinkedChildren.Any(i => i.ItemId.HasValue && i.ItemId == itemId))
if (currentLinkedChildren.Any(i => i.Id == itemId))
{
throw new ArgumentException("Item already exists in collection");
}