* Batch actions for visible books: 'remove from library' complete

* refactor entity properties into extension methods
* refactor shared simple message boxes => MessageBoxLib
This commit is contained in:
Robert McRackan 2022-05-12 09:53:21 -04:00
parent b784bd6b8d
commit 75c5f662dc
22 changed files with 272 additions and 231 deletions

View file

@ -313,7 +313,7 @@ namespace ApplicationServices
// must be here instead of in db layer due to AaxcExists
public static LiberatedStatus Liberated_Status(Book book)
=> book.Audio_Exists ? book.UserDefinedItem.BookStatus
=> book.Audio_Exists() ? book.UserDefinedItem.BookStatus
: AudibleFileStorage.AaxcExists(book.AudibleProductId) ? LiberatedStatus.PartialDownload
: LiberatedStatus.NotLiberated;
@ -340,7 +340,7 @@ namespace ApplicationServices
var boolResults = libraryBooks
.AsParallel()
.Where(lb => lb.Book.HasPdf)
.Where(lb => lb.Book.HasPdf())
.Select(lb => Pdf_Status(lb.Book))
.ToList();
var pdfsDownloaded = boolResults.Count(r => r == LiberatedStatus.Liberated);