aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2026-06-27 10:02:33 -0400
committerGitHub <noreply@github.com>2026-06-27 10:02:33 -0400
commit75d71cb73cb0b1e64b893b72afec1d59963e7e56 (patch)
tree8e8f4d02276e8ff863a02ca4331ad875d93d2b27 /Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
parent310a47c1d4f241346cc4cda4e025758bf1e6247c (diff)
parentc158418e0b6e2449c91e022c7cc23981658b5449 (diff)
Merge branch 'master' into clean-orphaned-people
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs')
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
index 96483ced99..3451c458f9 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
@@ -75,6 +75,14 @@ public class PeopleValidationTask : IScheduledTask, IConfigurableScheduledTask
/// <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;
+ }
+
var context = await _dbContextFactory.CreateDbContextAsync(cancellationToken).ConfigureAwait(false);
await using (context.ConfigureAwait(false))
{