update queries

This commit is contained in:
Luke Pulverenti 2016-05-10 22:21:28 -04:00
parent 022c242f3a
commit 3aa349fd1f
4 changed files with 12 additions and 10 deletions

View File

@ -142,7 +142,8 @@ namespace MediaBrowser.Controller.Playlists
Recursive = true,
IsFolder = false,
SortBy = new[] { ItemSortBy.SortName },
MediaTypes = new[] { mediaType }
MediaTypes = new[] { mediaType },
EnableTotalRecordCount = false
};
var itemsResult = await folder.GetItems(query).ConfigureAwait(false);

View File

@ -27,10 +27,12 @@ namespace MediaBrowser.Providers.Music
{
if (!item.IsLocked)
{
var itemFilter = item.GetItemFilter();
var taggedItems = item.IsAccessedByName ?
LibraryManager.RootFolder.GetRecursiveChildren(i => !i.IsFolder && itemFilter(i)).ToList() :
item.GetTaggedItems(new Controller.Entities.InternalItemsQuery()
{
Recursive = true,
IsFolder = false
}) :
item.GetRecursiveChildren(i => i is IHasArtist && !i.IsFolder).ToList();
if (!item.LockedFields.Contains(MetadataFields.Genres))

View File

@ -115,11 +115,10 @@ namespace MediaBrowser.Server.Implementations.Dto
{
if (options.Fields.Contains(ItemFields.ItemCounts))
{
var itemFilter = byName.GetItemFilter();
var libraryItems = user != null ?
user.RootFolder.GetRecursiveChildren(user, itemFilter) :
_libraryManager.RootFolder.GetRecursiveChildren(itemFilter);
var libraryItems = byName.GetTaggedItems(new InternalItemsQuery(user)
{
Recursive = true
});
SetItemByNameInfo(item, dto, libraryItems.ToList(), user);
}

View File

@ -25,7 +25,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var count = maxYear - yearNumber + 1;
var numComplete = 0;
while (yearNumber < DateTime.UtcNow.Year + 3)
while (yearNumber < maxYear)
{
try
{