aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-06-25 19:32:36 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-06-25 19:32:36 +0200
commit1947296edd449e9a7244d18716fcb8ff0e9f0dc8 (patch)
treea5bc8c5ec837853ad795ece0b132e272ea20ba01 /Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
parent987744529aadd3a5e0da60ae1e6dec0e6e8ea469 (diff)
Don't run heavy DB tasks while scan is running
Diffstat (limited to 'Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs')
-rw-r--r--Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
index 6e4e5c7808..2a38b8c446 100644
--- a/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
+++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/PeopleValidationTask.cs
@@ -71,6 +71,13 @@ 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)
+ {
+ return;
+ }
+
IProgress<double> subProgress = new Progress<double>((val) => progress.Report(val / 2));
await _libraryManager.ValidatePeopleAsync(subProgress, cancellationToken).ConfigureAwait(false);