reduce use of Book.Supplements

This commit is contained in:
Robert McRackan 2021-08-23 16:16:08 -04:00
parent f19c46ee45
commit d7eb190f69
3 changed files with 15 additions and 15 deletions

View file

@ -186,7 +186,7 @@ namespace ApplicationServices
: LiberatedStatus.NotLiberated;
public static LiberatedStatus? Pdf_Status(Book book)
=> !book.Supplements.Any() ? null
=> !book.HasPdf ? null
: book.PDF_Exists ? LiberatedStatus.Liberated
: LiberatedStatus.NotLiberated;
@ -207,7 +207,7 @@ namespace ApplicationServices
var boolResults = libraryBooks
.AsParallel()
.Where(lb => lb.Book.Supplements.Any())
.Where(lb => lb.Book.HasPdf)
.Select(lb => Pdf_Status(lb.Book))
.ToList();
var pdfsDownloaded = boolResults.Count(r => r == LiberatedStatus.Liberated);