update item by name validators

This commit is contained in:
Luke Pulverenti
2016-08-18 11:13:18 -04:00
parent 389487638e
commit 845c4a0d62
10 changed files with 95 additions and 42 deletions

View File

@@ -903,6 +903,14 @@ namespace MediaBrowser.Controller.Entities
if (query.ItemIds.Length > 0)
{
var specificItems = query.ItemIds.Select(LibraryManager.GetItemById).Where(i => i != null).ToList();
if (query.SortBy.Length == 0)
{
var ids = query.ItemIds.ToList();
// Try to preserve order
specificItems = specificItems.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToList();
}
return Task.FromResult(PostFilterAndSort(specificItems, query, true, true));
}

View File

@@ -170,6 +170,10 @@ namespace MediaBrowser.Controller.Persistence
QueryResult<Tuple<BaseItem, ItemCounts>> GetArtists(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetAlbumArtists(InternalItemsQuery query);
QueryResult<Tuple<BaseItem, ItemCounts>> GetAllArtists(InternalItemsQuery query);
List<string> GetStudioNames();
List<string> GetAllArtistNames();
}
}