diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 18823fa9d..0fc8fdc48 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -149,12 +149,17 @@ namespace Emby.Server.Implementations.Collections return GetCollectionsFolder(string.Empty); } - public Task AddToCollection(Guid collectionId, string[] ids) + public Task AddToCollection(Guid collectionId, IEnumerable ids) { return AddToCollection(collectionId, ids, true, new MetadataRefreshOptions(_fileSystem)); } - private async Task AddToCollection(Guid collectionId, string[] ids, bool fireEvent, MetadataRefreshOptions refreshOptions) + public Task AddToCollection(Guid collectionId, IEnumerable ids) + { + return AddToCollection(collectionId, ids.Select(i => i.ToString("N")), true, new MetadataRefreshOptions(_fileSystem)); + } + + private async Task AddToCollection(Guid collectionId, IEnumerable ids, bool fireEvent, MetadataRefreshOptions refreshOptions) { var collection = _libraryManager.GetItemById(collectionId) as BoxSet; @@ -167,9 +172,9 @@ namespace Emby.Server.Implementations.Collections var itemList = new List(); var currentLinkedChildrenIds = collection.GetLinkedChildren().Select(i => i.Id).ToList(); - foreach (var itemId in ids) + foreach (var id in ids) { - var guidId = new Guid(itemId); + var guidId = new Guid(id); var item = _libraryManager.GetItemById(guidId); if (string.IsNullOrWhiteSpace(item.Path)) @@ -214,7 +219,12 @@ namespace Emby.Server.Implementations.Collections } } - public async Task RemoveFromCollection(Guid collectionId, string[] itemIds) + public Task RemoveFromCollection(Guid collectionId, IEnumerable itemIds) + { + return RemoveFromCollection(collectionId, itemIds.Select(i => new Guid(i))); + } + + public async Task RemoveFromCollection(Guid collectionId, IEnumerable itemIds) { var collection = _libraryManager.GetItemById(collectionId) as BoxSet; @@ -226,9 +236,8 @@ namespace Emby.Server.Implementations.Collections var list = new List(); var itemList = new List(); - foreach (var itemId in itemIds) + foreach (var guidId in itemIds) { - var guidId = new Guid(itemId); var childItem = _libraryManager.GetItemById(guidId); var child = collection.LinkedChildren.FirstOrDefault(i => (i.ItemId.HasValue && i.ItemId.Value == guidId) || (childItem != null && string.Equals(childItem.Path, i.Path, StringComparison.OrdinalIgnoreCase))); diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index ab1255b57..4d1e1eaac 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -290,6 +290,7 @@ namespace Emby.Server.Implementations.Updates protected PackageInfo[] FilterPackages(List packages) { + foreach (var package in packages) { package.versions = package.versions.Where(v => !string.IsNullOrWhiteSpace(v.sourceUrl)) diff --git a/MediaBrowser.Controller/Collections/ICollectionManager.cs b/MediaBrowser.Controller/Collections/ICollectionManager.cs index 0ca7b2e3e..d89843cc0 100644 --- a/MediaBrowser.Controller/Collections/ICollectionManager.cs +++ b/MediaBrowser.Controller/Collections/ICollectionManager.cs @@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.Collections /// The collection identifier. /// The item ids. /// Task. - Task AddToCollection(Guid collectionId, string[] itemIds); + Task AddToCollection(Guid collectionId, IEnumerable itemIds); /// /// Removes from collection. @@ -44,7 +44,10 @@ namespace MediaBrowser.Controller.Collections /// The collection identifier. /// The item ids. /// Task. - Task RemoveFromCollection(Guid collectionId, string[] itemIds); + Task RemoveFromCollection(Guid collectionId, IEnumerable itemIds); + + Task AddToCollection(Guid collectionId, IEnumerable itemIds); + Task RemoveFromCollection(Guid collectionId, IEnumerable itemIds); /// /// Collapses the items within box sets. diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index a86735bca..e4eff4888 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.735 + 3.0.736 Emby.Common Emby Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 3b9c0c83b..f153d3e6b 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.735 + 3.0.736 Emby.Server.Core Emby Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Emby Server. Copyright © Emby 2013 - + diff --git a/SharedVersion.cs b/SharedVersion.cs index 9e7217a6d..0f504796b 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.28.1")] +[assembly: AssemblyVersion("3.2.28.2")]