Fixed FindInactiveBooks to work with new logger.
This commit is contained in:
parent
126919d578
commit
3ae0f2daa2
@ -18,6 +18,8 @@ namespace ApplicationServices
|
|||||||
|
|
||||||
public static async Task<List<LibraryBook>> FindInactiveBooks(Func<Account, ILoginCallback> loginCallbackFactoryFunc, List<LibraryBook> existingLibrary, params Account[] accounts)
|
public static async Task<List<LibraryBook>> FindInactiveBooks(Func<Account, ILoginCallback> loginCallbackFactoryFunc, List<LibraryBook> existingLibrary, params Account[] accounts)
|
||||||
{
|
{
|
||||||
|
logRestart();
|
||||||
|
|
||||||
//These are the minimum response groups required for the
|
//These are the minimum response groups required for the
|
||||||
//library scanner to pass all validation and filtering.
|
//library scanner to pass all validation and filtering.
|
||||||
LibraryResponseGroups =
|
LibraryResponseGroups =
|
||||||
@ -30,8 +32,12 @@ namespace ApplicationServices
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
logTime($"pre {nameof(scanAccountsAsync)} all");
|
||||||
var libraryItems = await scanAccountsAsync(loginCallbackFactoryFunc, accounts);
|
var libraryItems = await scanAccountsAsync(loginCallbackFactoryFunc, accounts);
|
||||||
Log.Logger.Information($"GetAllLibraryItems: Total count {libraryItems.Count}");
|
logTime($"post {nameof(scanAccountsAsync)} all");
|
||||||
|
|
||||||
|
var totalCount = libraryItems.Count;
|
||||||
|
Log.Logger.Information($"GetAllLibraryItems: Total count {totalCount}");
|
||||||
|
|
||||||
var missingBookList = existingLibrary.Where(b => !libraryItems.Any(i => i.DtoItem.Asin == b.Book.AudibleProductId)).ToList();
|
var missingBookList = existingLibrary.Where(b => !libraryItems.Any(i => i.DtoItem.Asin == b.Book.AudibleProductId)).ToList();
|
||||||
|
|
||||||
@ -57,12 +63,14 @@ namespace ApplicationServices
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Log.Logger.Error(ex, "Error importing library");
|
Log.Logger.Error(ex, "Error scanning library");
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
LibraryResponseGroups = LibraryOptions.ResponseGroupOptions.ALL_OPTIONS;
|
LibraryResponseGroups = LibraryOptions.ResponseGroupOptions.ALL_OPTIONS;
|
||||||
|
stop();
|
||||||
|
var putBreakPointHere = logOutput;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user