|
|
|
@ -149,24 +149,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|
|
|
|
item = user == null ? _libraryManager.RootFolder : user.RootFolder;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(request.Ids))
|
|
|
|
|
{
|
|
|
|
|
var query = GetItemsQuery(request, user);
|
|
|
|
|
var specificItems = _libraryManager.GetItemList(query).ToArray();
|
|
|
|
|
if (query.SortBy.Length == 0)
|
|
|
|
|
{
|
|
|
|
|
var ids = query.ItemIds.ToList();
|
|
|
|
|
|
|
|
|
|
// Try to preserve order
|
|
|
|
|
specificItems = specificItems.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToArray();
|
|
|
|
|
}
|
|
|
|
|
return new QueryResult<BaseItem>
|
|
|
|
|
{
|
|
|
|
|
Items = specificItems.ToArray(),
|
|
|
|
|
TotalRecordCount = specificItems.Length
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Default list type = children
|
|
|
|
|
|
|
|
|
|
var folder = item as Folder;
|
|
|
|
@ -289,8 +271,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|
|
|
|
case ItemFilter.IsPlayed:
|
|
|
|
|
query.IsPlayed = true;
|
|
|
|
|
break;
|
|
|
|
|
case ItemFilter.IsRecentlyAdded:
|
|
|
|
|
break;
|
|
|
|
|
case ItemFilter.IsResumable:
|
|
|
|
|
query.IsResumable = true;
|
|
|
|
|
break;
|
|
|
|
|