The Free Software Media System - Server Backend & API
Merge branch 'master' into clean-orphaned-people
Cody Robibero75d71cb73cb0
diff --cc Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.csindex 96483ced99,305f98790d..3451c458f9--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs@@@ -75,6 -75,18 +75,14 @@@ public class PeopleValidationTask : ISc/// <inheritdoc />public async Task ExecuteAsync(IProgress<double> progress, CancellationToken cancellationToken){+ // People validation performs heavy database writes that contend with an active library scan.+ // Defer it until the scan has finished; the task will run again on its next trigger.+ if (_libraryManager.IsScanRunning)+ {+ _logger.LogInformation("Skipping people validation because a library scan is currently running.");+ return;+ }+- IProgress<double> subProgress = new Progress<double>((val) => progress.Report(val / 2));- await _libraryManager.ValidatePeopleAsync(subProgress, cancellationToken).ConfigureAwait(false);-- subProgress = new Progress<double>((val) => progress.Report((val / 2) + 50));var context = await _dbContextFactory.CreateDbContextAsync(cancellationToken).ConfigureAwait(false);await using (context.ConfigureAwait(false)){