diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj
index b19e51bb..d431c4cd 100644
--- a/LibationLauncher/LibationLauncher.csproj
+++ b/LibationLauncher/LibationLauncher.csproj
@@ -13,7 +13,7 @@
win-x64
- 4.1.9.1
+ 4.2.0.1
diff --git a/LibationSearchEngine/UNTESTED/SearchEngine.cs b/LibationSearchEngine/UNTESTED/SearchEngine.cs
index 5f5dea1f..f9a065b9 100644
--- a/LibationSearchEngine/UNTESTED/SearchEngine.cs
+++ b/LibationSearchEngine/UNTESTED/SearchEngine.cs
@@ -119,6 +119,10 @@ namespace LibationSearchEngine
[nameof(Book.IsAbridged)] = lb => lb.Book.IsAbridged,
["Abridged"] = lb => lb.Book.IsAbridged,
+
+ // this will only be evaluated at time of re-index. ie: state of files moved later will be out of sync until next re-index
+ ["IsLiberated"] = lb => AudibleFileStorage.Audio.Exists(lb.Book.AudibleProductId),
+ ["Liberated"] = lb => AudibleFileStorage.Audio.Exists(lb.Book.AudibleProductId),
});
private static bool isAuthorNarrated(LibraryBook lb)
diff --git a/LibationWinForms/UNTESTED/BookLiberation/ProcessorAutomationController.cs b/LibationWinForms/UNTESTED/BookLiberation/ProcessorAutomationController.cs
index 1d0605f1..ec53e17f 100644
--- a/LibationWinForms/UNTESTED/BookLiberation/ProcessorAutomationController.cs
+++ b/LibationWinForms/UNTESTED/BookLiberation/ProcessorAutomationController.cs
@@ -81,9 +81,17 @@ namespace LibationWinForms.BookLiberation
backupBook.DownloadPdf.Completed += completedAction;
}
+ // enables search engine to index for things like "IsLiberated"
+ backupBook.DownloadBook.Completed += reindex;
+ backupBook.DecryptBook.Completed += reindex;
+ backupBook.DownloadPdf.Completed += reindex;
+
return backupBook;
}
+ private static async void reindex(object sender, LibraryBook e)
+ => await Task.Run(() => ApplicationServices.SearchEngineCommands.FullReIndex());
+
private static (AutomatedBackupsForm, LogMe) attachToBackupsForm(BackupBook backupBook)
{
#region create form and logger