diff --git a/ApplicationServices/ApplicationServices.csproj b/ApplicationServices/ApplicationServices.csproj index 195d2085..1694451b 100644 --- a/ApplicationServices/ApplicationServices.csproj +++ b/ApplicationServices/ApplicationServices.csproj @@ -11,7 +11,6 @@ - diff --git a/ApplicationServices/LibraryCommands.cs b/ApplicationServices/LibraryCommands.cs index efafb3e2..164fcee7 100644 --- a/ApplicationServices/LibraryCommands.cs +++ b/ApplicationServices/LibraryCommands.cs @@ -178,8 +178,6 @@ namespace ApplicationServices } #endregion - // below are queries, not commands. maybe I should make a LibraryQueries. except there's already one of those... - public static LiberatedStatus Liberated_Status(Book book) => book.Audio_Exists ? LiberatedStatus.Liberated : FileManager.AudibleFileStorage.AaxcExists(book.AudibleProductId) ? LiberatedStatus.PartialDownload @@ -190,6 +188,8 @@ namespace ApplicationServices : book.PDF_Exists ? LiberatedStatus.Liberated : LiberatedStatus.NotLiberated; + // below are queries, not commands. maybe I should make a LibraryQueries. except there's already one of those... + public record LibraryStats(int booksFullyBackedUp, int booksDownloadedOnly, int booksNoProgress, int pdfsDownloaded, int pdfsNotDownloaded) { } public static LibraryStats GetCounts() { diff --git a/LibationWinForms/GridEntry.cs b/LibationWinForms/GridEntry.cs index ef451cfd..10f6e11a 100644 --- a/LibationWinForms/GridEntry.cs +++ b/LibationWinForms/GridEntry.cs @@ -177,6 +177,7 @@ namespace LibationWinForms get => string.Join("\r\n", Book.UserDefinedItem.TagsEnumerated); set => Book.UserDefinedItem.Tags = value; } + // these 2 values being in 1 field is the trick behind getting the liberated+pdf 'stoplight' icon to draw. See: LiberateDataGridViewImageButtonCell.Paint public (LiberatedStatus BookStatus, LiberatedStatus? PdfStatus) Liberate { get => (LibraryCommands.Liberated_Status(LibraryBook.Book), LibraryCommands.Pdf_Status(LibraryBook.Book));