Improve Library load and refresh performance
This commit is contained in:
parent
ef1edf1136
commit
e1cd8b8f94
4 changed files with 45 additions and 25 deletions
|
|
@ -266,7 +266,7 @@ namespace LibationWinForms.GridView
|
|||
|
||||
var allEntries = bindingList.AllItems().BookEntries();
|
||||
var seriesEntries = bindingList.AllItems().SeriesEntries().ToList();
|
||||
var parentedEpisodes = dbBooks.ParentedEpisodes();
|
||||
var parentedEpisodes = dbBooks.ParentedEpisodes().ToList();
|
||||
|
||||
foreach (var libraryBook in dbBooks.OrderBy(e => e.DateAdded))
|
||||
{
|
||||
|
|
@ -276,8 +276,8 @@ namespace LibationWinForms.GridView
|
|||
AddOrUpdateBook(libraryBook, existingEntry);
|
||||
else if(parentedEpisodes.Any(lb => lb == libraryBook))
|
||||
//Only try to add or update is this LibraryBook is a know child of a parent
|
||||
AddOrUpdateEpisode(libraryBook, existingEntry, seriesEntries, dbBooks);
|
||||
}
|
||||
AddOrUpdateEpisode(libraryBook, existingEntry, seriesEntries, dbBooks);
|
||||
}
|
||||
|
||||
bindingList.SuspendFilteringOnUpdate = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue