Removing books

* message box is too big when removing huge amounts of books. This scenario is typical when removing podcasts
* removing books should remove user defined entries. eg: tags and is-liberated
This commit is contained in:
Robert McRackan 2021-09-24 10:00:52 -04:00
parent 7c38e18435
commit d2eaf26117
3 changed files with 11 additions and 4 deletions

View file

@ -192,6 +192,7 @@ namespace ApplicationServices
var removeLibraryBooks = libBooks.Where(lb => idsToRemove.Contains(lb.Book.AudibleProductId)).ToList();
context.LibraryBooks.RemoveRange(removeLibraryBooks);
context.Books.RemoveRange(removeLibraryBooks.Select(lb => lb.Book));
var qtyChanges = context.SaveChanges();
if (qtyChanges > 0)