run fast people providers during library scan to pick up images quicker

This commit is contained in:
Luke Pulverenti 2013-10-13 21:09:42 -04:00
parent 559acbc074
commit bef67412b1

View File

@ -41,12 +41,10 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
/// <returns>Task.</returns>
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
{
RunInternal(progress, cancellationToken);
return Task.FromResult(true);
return RunInternal(progress, cancellationToken);
}
private void RunInternal(IProgress<double> progress, CancellationToken cancellationToken)
private async Task RunInternal(IProgress<double> progress, CancellationToken cancellationToken)
{
var userLibraries = _userManager.Users
.Select(i => new Tuple<Guid, IList<BaseItem>>(i.Id, i.RootFolder.GetRecursiveChildren(i, null)))
@ -90,6 +88,8 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var itemByName = _libraryManager.GetPerson(name);
await itemByName.RefreshMetadata(cancellationToken, allowSlowProviders: false).ConfigureAwait(false);
foreach (var libraryId in counts.Keys)
{
var itemCounts = CountHelpers.GetCounts(counts[libraryId]);