diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-15 00:14:07 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-15 00:14:07 -0400 |
| commit | d55af4f5292236317f572e0bddfe9575a21c4662 (patch) | |
| tree | bcca14d48121f2fe2443823cc715873e56053238 /MediaBrowser.Server.Implementations/Collections/CollectionManager.cs | |
| parent | 02bfc112ce4df09e80aec5da0a0f4fe552df6239 (diff) | |
support grouping behind boxsets
Diffstat (limited to 'MediaBrowser.Server.Implementations/Collections/CollectionManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Collections/CollectionManager.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs index 9a196cc47a..8e70c1d3dc 100644 --- a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs +++ b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs @@ -126,6 +126,18 @@ namespace MediaBrowser.Server.Implementations.Collections ItemType = item.GetType().Name, Type = LinkedChildType.Manual }); + + var supportsGrouping = item as ISupportsBoxSetGrouping; + + if (supportsGrouping != null) + { + var boxsetIdList = supportsGrouping.BoxSetIdList.ToList(); + if (!boxsetIdList.Contains(collectionId)) + { + boxsetIdList.Add(collectionId); + } + supportsGrouping.BoxSetIdList = boxsetIdList; + } } collection.LinkedChildren.AddRange(list); @@ -156,6 +168,16 @@ namespace MediaBrowser.Server.Implementations.Collections } list.Add(child); + + var childItem = _libraryManager.GetItemById(itemId); + var supportsGrouping = childItem as ISupportsBoxSetGrouping; + + if (supportsGrouping != null) + { + var boxsetIdList = supportsGrouping.BoxSetIdList.ToList(); + boxsetIdList.Remove(collectionId); + supportsGrouping.BoxSetIdList = boxsetIdList; + } } var shortcutFiles = Directory |
