The Free Software Media System - Server Backend & API
added Ids filter to ItemsService.cs
LukePulverenti656a9ddaecc0
diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csprojindex fc02410cc2..58564fc900 100644--- a/MediaBrowser.Api/MediaBrowser.Api.csproj+++ b/MediaBrowser.Api/MediaBrowser.Api.csproj@@ -140,9 +140,6 @@<ItemGroup><None Include="packages.config" /></ItemGroup>- <ItemGroup>- <Content Include="options.xml" />- </ItemGroup><ItemGroup /><Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /><PropertyGroup>diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.csindex 9ed6279999..e5e88b4388 100644--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs@@ -100,6 +100,13 @@ namespace MediaBrowser.Api.UserLibrary/// <value>The image types.</value>[ApiMember(Name = "ImageTypes", Description = "Optional. If specified, results will be filtered based on those containing image types. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]public string ImageTypes { get; set; }++ /// <summary>+ /// Gets or sets the item ids.+ /// </summary>+ /// <value>The item ids.</value>+ [ApiMember(Name = "Ids", Description = "Optional. If specific items are needed, specify a list of item id's to retrieve. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]+ public string Ids { get; set; }}/// <summary>@@ -193,6 +200,13 @@ namespace MediaBrowser.Api.UserLibrary// Default list type = children+ if (!string.IsNullOrEmpty(request.Ids))+ {+ var idList = request.Ids.Split(',').ToList();++ return idList.Select(i => DtoBuilder.GetItemByClientId(i, _userManager, _libraryManager, user.Id));+ }+if (request.Recursive){return ((Folder)item).GetRecursiveChildren(user);