diff --git a/AppScaffolding/AppScaffolding.csproj b/AppScaffolding/AppScaffolding.csproj
index 1e712e8e..278c50b0 100644
--- a/AppScaffolding/AppScaffolding.csproj
+++ b/AppScaffolding/AppScaffolding.csproj
@@ -3,7 +3,7 @@
net5.0
- 5.7.5.1
+ 6.0.0.1
diff --git a/ApplicationServices/LibraryCommands.cs b/ApplicationServices/LibraryCommands.cs
index da35e4c3..5422f987 100644
--- a/ApplicationServices/LibraryCommands.cs
+++ b/ApplicationServices/LibraryCommands.cs
@@ -136,11 +136,11 @@ namespace ApplicationServices
{
var callback = loginCallbackFactoryFunc(account);
- // get APIs in serial, esp b/c of logins
- var api = await AudibleApiActions.GetApiAsync(callback, account);
+ // get APIs in serial b/c of logins
+ var apiExtended = await ApiExtended.CreateAsync(callback, account);
// add scanAccountAsync as a TASK: do not await
- tasks.Add(scanAccountAsync(api, account));
+ tasks.Add(scanAccountAsync(apiExtended, account));
}
// import library in parallel
@@ -149,7 +149,7 @@ namespace ApplicationServices
return importItems;
}
- private static async Task> scanAccountAsync(Api api, Account account)
+ private static async Task> scanAccountAsync(ApiExtended apiExtended, Account account)
{
ArgumentValidator.EnsureNotNull(account, nameof(account));
@@ -160,7 +160,7 @@ namespace ApplicationServices
logTime($"pre scanAccountAsync {account.AccountName}");
- var dtoItems = await AudibleApiActions.GetLibraryValidatedAsync(api, LibraryResponseGroups);
+ var dtoItems = await apiExtended.GetLibraryValidatedAsync(LibraryResponseGroups);
logTime($"post scanAccountAsync {account.AccountName} qty: {dtoItems.Count}");
diff --git a/FileLiberator/DownloadDecryptBook.cs b/FileLiberator/DownloadDecryptBook.cs
index 9836d8f1..61c813f1 100644
--- a/FileLiberator/DownloadDecryptBook.cs
+++ b/FileLiberator/DownloadDecryptBook.cs
@@ -84,16 +84,16 @@ namespace FileLiberator
{
validate(libraryBook);
- var api = await InternalUtilities.AudibleApiActions.GetApiAsync(libraryBook.Account, libraryBook.Book.Locale);
+ var apiExtended = await InternalUtilities.ApiExtended.CreateAsync(libraryBook.Account, libraryBook.Book.Locale);
- var contentLic = await api.GetDownloadLicenseAsync(libraryBook.Book.AudibleProductId);
+ var contentLic = await apiExtended.Api.GetDownloadLicenseAsync(libraryBook.Book.AudibleProductId);
var aaxcDecryptDlLic = new DownloadLicense
(
contentLic?.ContentMetadata?.ContentUrl?.OfflineUrl,
contentLic?.Voucher?.Key,
contentLic?.Voucher?.Iv,
- Resources.UserAgent
+ Resources.USER_AGENT
);
if (Configuration.Instance.AllowLibationFixup)
diff --git a/FileLiberator/DownloadPdf.cs b/FileLiberator/DownloadPdf.cs
index e843dfa1..6b37278e 100644
--- a/FileLiberator/DownloadPdf.cs
+++ b/FileLiberator/DownloadPdf.cs
@@ -59,8 +59,8 @@ namespace FileLiberator
private async Task downloadPdfAsync(LibraryBook libraryBook, string proposedDownloadFilePath)
{
- var api = await GetApiAsync(libraryBook);
- var downloadUrl = await api.GetPdfDownloadLinkAsync(libraryBook.Book.AudibleProductId);
+ var apiExtended = await GetApiExtendedAsync(libraryBook);
+ var downloadUrl = await apiExtended.Api.GetPdfDownloadLinkAsync(libraryBook.Book.AudibleProductId);
var client = new HttpClient();
var actualDownloadedFilePath = await PerformDownloadAsync(
diff --git a/FileLiberator/DownloadableBase.cs b/FileLiberator/DownloadableBase.cs
index 38b5a76e..84351627 100644
--- a/FileLiberator/DownloadableBase.cs
+++ b/FileLiberator/DownloadableBase.cs
@@ -40,8 +40,8 @@ namespace FileLiberator
}
}
- protected static Task GetApiAsync(LibraryBook libraryBook)
- => InternalUtilities.AudibleApiActions.GetApiAsync(libraryBook.Account, libraryBook.Book.Locale);
+ protected static Task GetApiExtendedAsync(LibraryBook libraryBook)
+ => InternalUtilities.ApiExtended.CreateAsync(libraryBook.Account, libraryBook.Book.Locale);
protected async Task PerformDownloadAsync(string proposedDownloadFilePath, Func