aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Collections/CollectionManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Collections/CollectionManager.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
index fe4b16645..9fee27db9 100644
--- a/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
+++ b/MediaBrowser.Server.Implementations/Collections/CollectionManager.cs
@@ -72,12 +72,17 @@ namespace MediaBrowser.Server.Implementations.Collections
DisplayMediaType = "Collection",
Path = path,
IsLocked = options.IsLocked,
- ProviderIds = options.ProviderIds
+ ProviderIds = options.ProviderIds,
+ Shares = options.UserIds.Select(i => new Share
+ {
+ UserId = i.ToString("N")
+
+ }).ToList()
};
await parentFolder.AddChild(collection, CancellationToken.None).ConfigureAwait(false);
- await collection.RefreshMetadata(new MetadataRefreshOptions(), CancellationToken.None)
+ await collection.RefreshMetadata(new MetadataRefreshOptions(new DirectoryService()), CancellationToken.None)
.ConfigureAwait(false);
if (options.ItemIdList.Count > 0)
@@ -156,7 +161,7 @@ namespace MediaBrowser.Server.Implementations.Collections
}
itemList.Add(item);
-
+
if (currentLinkedChildren.Any(i => i.Id == itemId))
{
throw new ArgumentException("Item already exists in collection");