From 7bcabdda38b69890ac6a4ac7c982c5ec6c919cb5 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Fri, 10 Jun 2022 18:30:16 -0600 Subject: [PATCH] FindInactiveBooks now fires ScanBegin and ScanEnd events --- Source/ApplicationServices/LibraryCommands.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/ApplicationServices/LibraryCommands.cs b/Source/ApplicationServices/LibraryCommands.cs index 66ee71e1..23c5dd7d 100644 --- a/Source/ApplicationServices/LibraryCommands.cs +++ b/Source/ApplicationServices/LibraryCommands.cs @@ -31,6 +31,13 @@ namespace ApplicationServices { logRestart(); + lock (_lock) + { + if (Scanning) + return new(); + ScanBegin?.Invoke(null, accounts.Length); + } + //These are the minimum response groups required for the //library scanner to pass all validation and filtering. var libraryOptions = new LibraryOptions @@ -83,6 +90,7 @@ namespace ApplicationServices { stop(); var putBreakPointHere = logOutput; + ScanEnd?.Invoke(null, null); } }