From 2481838b4a855d48bf0a7f1267893bbccf51c497 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 7 Aug 2016 17:57:46 -0400 Subject: [PATCH] fix people refresh progress display --- .../Library/Validators/PeopleValidator.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs index aa993d176..191c7ef28 100644 --- a/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs +++ b/MediaBrowser.Server.Implementations/Library/Validators/PeopleValidator.cs @@ -115,6 +115,8 @@ namespace MediaBrowser.Server.Implementations.Library.Validators _logger.Debug("Will refresh {0} people", dict.Count); + var numPeople = dict.Count; + foreach (var person in dict) { cancellationToken.ThrowIfCancellationRequested(); @@ -124,7 +126,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators var item = _libraryManager.GetPerson(person.Key); var hasMetdata = !string.IsNullOrWhiteSpace(item.Overview); - var performFullRefresh = !hasMetdata && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= 90; + var performFullRefresh = !hasMetdata && (DateTime.UtcNow - item.DateLastRefreshed).TotalDays >= 60; var defaultMetadataRefreshMode = performFullRefresh ? MetadataRefreshMode.FullRefresh @@ -155,7 +157,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators // Update progress numComplete++; double percent = numComplete; - percent /= people.Count; + percent /= numPeople; progress.Report(100 * percent); }