From ae6384486c81b221deea9acb982cfd5752b8e0ca Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Tue, 22 Jun 2021 22:26:39 -0400 Subject: [PATCH 1/2] All downloads are now aaxc, not aax --- FileLiberator/DownloadBook.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FileLiberator/DownloadBook.cs b/FileLiberator/DownloadBook.cs index cd69c2c1..c32aa51e 100644 --- a/FileLiberator/DownloadBook.cs +++ b/FileLiberator/DownloadBook.cs @@ -39,7 +39,7 @@ namespace FileLiberator => FileUtility.GetValidFilename( AudibleFileStorage.DownloadsInProgress, libraryBook.Book.Title, - "aax", + "aaxc", libraryBook.Book.AudibleProductId); private async Task downloadAaxcBookAsync(LibraryBook libraryBook, string tempAaxFilename) From 703e71ad74f56f4c88c135fb88e777757d21e776 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Tue, 22 Jun 2021 22:36:16 -0400 Subject: [PATCH 2/2] Clean up minutia --- LibationLauncher/LibationLauncher.csproj | 2 +- LibationLauncher/Program.cs | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index cd9acb48..3b7129f2 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 4.4.0.63 + 4.4.0.64 diff --git a/LibationLauncher/Program.cs b/LibationLauncher/Program.cs index f63ca021..bc001ad6 100644 --- a/LibationLauncher/Program.cs +++ b/LibationLauncher/Program.cs @@ -30,7 +30,7 @@ namespace LibationLauncher migrate_to_v4_0_0(); migrate_to_v4_0_3(); // add setting for whether to delete/retain aax - migrate_to_v5_x_x(); + migrate_to_v5_0_0(); ensureLoggingConfig(); ensureSerilogConfig(); @@ -229,15 +229,19 @@ namespace LibationLauncher } #endregion - #region migrate_to_v5_x_x re-gegister device if device info not in settings - private static void migrate_to_v5_x_x() + #region migrate_to_v5_0_0 re-gegister device if device info not in settings + private static void migrate_to_v5_0_0() { if (!File.Exists(AudibleApiStorage.AccountsSettingsFile)) return; var accountsPersister = AudibleApiStorage.GetAccountsSettingsPersister(); - foreach (var account in accountsPersister?.AccountsSettings?.Accounts) + var accounts = accountsPersister?.AccountsSettings?.Accounts; + if (accounts is null) + return; + + foreach (var account in accounts) { var identity = account?.IdentityTokens; @@ -249,7 +253,7 @@ namespace LibationLauncher !string.IsNullOrWhiteSpace(identity.AmazonAccountId)) continue; - var authorize = new AudibleApi.Authorization.Authorize(identity.Locale); + var authorize = new Authorize(identity.Locale); try {