aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-15 11:17:46 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-15 11:17:46 -0400
commit9a6afa92889c57e5f7b0e8cc937376fe6393ebb4 (patch)
treef0bd1bf7a2498328ef07e0fcdc648d2475e5c0f0 /MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
parentd55af4f5292236317f572e0bddfe9575a21c4662 (diff)
Add new params to collection creation
Diffstat (limited to 'MediaBrowser.Server.Implementations/Collections/CollectionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Collections/CollectionManager.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
index 8e70c1d3d..60d631c1a 100644
--- a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
+++ b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
@@ -26,7 +26,7 @@ namespace MediaBrowser.Server.Implementations.Collections
_iLibraryMonitor = iLibraryMonitor;
}
- public async Task CreateCollection(CollectionCreationOptions options)
+ public async Task<BoxSet> CreateCollection(CollectionCreationOptions options)
{
var name = options.Name;
@@ -64,6 +64,13 @@ namespace MediaBrowser.Server.Implementations.Collections
await collection.RefreshMetadata(new MetadataRefreshOptions(), CancellationToken.None)
.ConfigureAwait(false);
+
+ if (options.ItemIdList.Count > 0)
+ {
+ await AddToCollection(collection.Id, options.ItemIdList);
+ }
+
+ return collection;
}
finally
{