Merge pull request #2038 from MediaBrowser/dev

Dev
pull/702/head
Luke 8 years ago committed by GitHub
commit bb44b68193

@ -115,6 +115,8 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
_logger.Debug("Will refresh {0} people", dict.Count); _logger.Debug("Will refresh {0} people", dict.Count);
var numPeople = dict.Count;
foreach (var person in dict) foreach (var person in dict)
{ {
cancellationToken.ThrowIfCancellationRequested(); cancellationToken.ThrowIfCancellationRequested();
@ -124,7 +126,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
var item = _libraryManager.GetPerson(person.Key); var item = _libraryManager.GetPerson(person.Key);
var hasMetdata = !string.IsNullOrWhiteSpace(item.Overview); 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 var defaultMetadataRefreshMode = performFullRefresh
? MetadataRefreshMode.FullRefresh ? MetadataRefreshMode.FullRefresh
@ -155,7 +157,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
// Update progress // Update progress
numComplete++; numComplete++;
double percent = numComplete; double percent = numComplete;
percent /= people.Count; percent /= numPeople;
progress.Report(100 * percent); progress.Report(100 * percent);
} }

Loading…
Cancel
Save