diff --git a/README.md b/README.md index f4df8e7..3edb690 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ _**Note:** Books downloaded with Book Lib Connect and exported for [AAX Audio Co ## Download -Windows setup package version 0.8, English, with manual: +Windows setup package version 0.9, English, with manual: -**[BookLibConnect-0.8-Setup.exe](https://github.com/audiamus/BookLibConnect/releases/download/v0.8/BookLibConnect-0.8-Setup.exe)** +**[BookLibConnect-0.9-Setup.exe](https://github.com/audiamus/BookLibConnect/releases/download/v0.9/BookLibConnect-0.9-Setup.exe)** ## Feedback Use the [Discussions](https://github.com/audiamus/BookLibConnect/discussions) and [Issues](https://github.com/audiamus/BookLibConnect/issues) sections. @@ -31,9 +31,9 @@ Be cautious with uploading log files to these sections as they may contain sensi ## Dependencies AAX Audio Converter will run on Windows 64bit. Minimum Windows version is 7. -The application requires .Net 5 64 bit to be installed. On Windows 10/11 systems this should normally be the case, if the system is kept up to date. -If not, the app will prompt you for downloading .Net 5 and open the link in your default web browser. From the many options, pick -**.Net 5 Runtime x64 for Windows desktop**. +The application requires .Net 6 64 bit to be installed. On Windows 10/11 systems this should normally be the case, if the system is kept up to date. +If not, the app will prompt you for downloading .Net 6 and open the link in your default web browser. From the many options, pick +**.Net 6 Runtime x64 for _Windows desktop_**. ## Acknowledgments - [mkb79](https://github.com/mkb79/Audible) for his Python library which served as the reference implementation of the Audible API to me, straightforward and easy to follow. diff --git a/res/Setup.json b/res/Setup.json index cc5cdb2..590e504 100644 --- a/res/Setup.json +++ b/res/Setup.json @@ -1,10 +1,10 @@ [ { - "Url": "https://github.com/audiamus/BookLibConnect/releases/download/v0.8/BookLibConnect-0.8-Setup.exe", + "Url": "https://github.com/audiamus/BookLibConnect/releases/download/v0.9/BookLibConnect-0.9-Setup.exe", "AppName": "BookLibConnect", - "Version": "0.8", + "Version": "0.9", "Preview": false, "Descript": "Standalone Audible downloader and decrypter, companion to AAX Audio Converter", - "Md5": "00e23831b05d51cc62b76cdb433648b2" + "Md5": "741a9fa8bf4d66066a3c9e2e378846f0" } ] diff --git a/src/Audible.json.core/Audible.json.core.csproj b/src/Audible.json.core/Audible.json.core.csproj index d6ca5f3..5083fa4 100644 --- a/src/Audible.json.core/Audible.json.core.csproj +++ b/src/Audible.json.core/Audible.json.core.csproj @@ -1,13 +1,13 @@ - net5.0 + net6.0 core.audiamus.adb.json audiamus.audiible.json.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.4.0.0 - 0.4.0.0 + 0.5.0.0 + 0.5.0.0 diff --git a/src/Audible.json.core/LibraryResponse.cs b/src/Audible.json.core/LibraryResponse.cs index 88297e4..b95bd6e 100644 --- a/src/Audible.json.core/LibraryResponse.cs +++ b/src/Audible.json.core/LibraryResponse.cs @@ -65,7 +65,7 @@ public class Product { public string origin_marketplace { get; set; } public string origin_type { get; set; } public string pdf_url { get; set; } - public float percent_complete { get; set; } + public float? percent_complete { get; set; } public Plan[] plans { get; set; } public Product_Images product_images { get; set; } public string publication_name { get; set; } diff --git a/src/Audible.json.core/LicenseResponse.cs b/src/Audible.json.core/LicenseResponse.cs index f5b7391..4889a4b 100644 --- a/src/Audible.json.core/LicenseResponse.cs +++ b/src/Audible.json.core/LicenseResponse.cs @@ -18,7 +18,7 @@ public partial class ContentLicense { public string license_response { get; set; } public string message { get; set; } public string request_id { get; set; } - public bool requires_ad_supported_playback { get; set; } + public bool? requires_ad_supported_playback { get; set; } public string status_code { get; set; } public string voucher_id { get; set; } @@ -33,18 +33,18 @@ public class ContentMetadata { } public class ChapterInfo { - public int brandIntroDurationMs { get; set; } - public int brandOutroDurationMs { get; set; } + public int? brandIntroDurationMs { get; set; } + public int? brandOutroDurationMs { get; set; } public Chapter[] chapters { get; set; } - public bool is_accurate { get; set; } - public int runtime_length_ms { get; set; } - public int runtime_length_sec { get; set; } + public bool? is_accurate { get; set; } + public int? runtime_length_ms { get; set; } + public int? runtime_length_sec { get; set; } } public class Chapter { - public int length_ms { get; set; } - public int start_offset_ms { get; set; } - public int start_offset_sec { get; set; } + public int? length_ms { get; set; } + public int? start_offset_ms { get; set; } + public int? start_offset_sec { get; set; } public string title { get; set; } public Chapter[] chapters { get; set; } } @@ -67,7 +67,7 @@ public class ContentUrl { public class LastPositionHeard { public string last_updated { get; set; } - public int position_ms { get; set; } + public int? position_ms { get; set; } public string status { get; set; } } } diff --git a/src/AuxLib.core/AuxLib.core.csproj b/src/AuxLib.core/AuxLib.core.csproj index ccb14d8..f694428 100644 --- a/src/AuxLib.core/AuxLib.core.csproj +++ b/src/AuxLib.core/AuxLib.core.csproj @@ -1,17 +1,17 @@ - net5.0 + net6.0 core.audiamus.aux audiamus.aux.core audiamus - 2.1.0.1 - 2.1.0.1 + 2.2.0.0 + 2.2.0.0 Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - + diff --git a/src/AuxWin.DialogBox.core/AuxWin.DialogBox.core.csproj b/src/AuxWin.DialogBox.core/AuxWin.DialogBox.core.csproj index ca235c0..b6c320f 100644 --- a/src/AuxWin.DialogBox.core/AuxWin.DialogBox.core.csproj +++ b/src/AuxWin.DialogBox.core/AuxWin.DialogBox.core.csproj @@ -1,13 +1,13 @@ - net5.0-windows + net6.0-windows true core.audiamus.aux.win audiamus.aux.win.dialogbox.core audiamus - 2.0.0.0 - 2.0.0.0 + 2.1.0.0 + 2.1.0.0 Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) diff --git a/src/AuxWin.lib.core/AuxWin.lib.core.csproj b/src/AuxWin.lib.core/AuxWin.lib.core.csproj index b556671..b3c301d 100644 --- a/src/AuxWin.lib.core/AuxWin.lib.core.csproj +++ b/src/AuxWin.lib.core/AuxWin.lib.core.csproj @@ -1,13 +1,13 @@  - net5.0-windows + net6.0-windows true core.audiamus.aux.win audiamus.aux.win.core audiamus - 2.1.0.0 - 2.1.0.0 + 2.2.0.0 + 2.2.0.0 Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) diff --git a/src/AuxWin32Lib.core/AuxWin32Lib.core.csproj b/src/AuxWin32Lib.core/AuxWin32Lib.core.csproj index b7decf0..76c202a 100644 --- a/src/AuxWin32Lib.core/AuxWin32Lib.core.csproj +++ b/src/AuxWin32Lib.core/AuxWin32Lib.core.csproj @@ -1,12 +1,12 @@  - net5.0-windows + net6.0 core.audiamus.aux.w32 audiamus.aux.w32.core audiamus - 2.1.1.0 - 2.1.1.0 + 2.2.0.0 + 2.2.0.0 Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) @@ -22,4 +22,8 @@ + + + + diff --git a/src/BooksDatabase.core/BooksDatabase.core.csproj b/src/BooksDatabase.core/BooksDatabase.core.csproj index 1de4063..84c1243 100644 --- a/src/BooksDatabase.core/BooksDatabase.core.csproj +++ b/src/BooksDatabase.core/BooksDatabase.core.csproj @@ -1,23 +1,23 @@ - net5.0 + net6.0 core.audiamus.booksdb audiamus.booksdb.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.5.0.0 - 0.5.0.0 + 0.6.0.0 + 0.6.0.0 - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CommonTypes.lib.core/CommonTypes.lib.core.csproj b/src/CommonTypes.lib.core/CommonTypes.lib.core.csproj index d0a2028..8018f79 100644 --- a/src/CommonTypes.lib.core/CommonTypes.lib.core.csproj +++ b/src/CommonTypes.lib.core/CommonTypes.lib.core.csproj @@ -1,13 +1,13 @@ - net5.0 + net6.0 core.audiamus.common audiamus.common.types.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.1.0.0 - 0.1.0.0 + 0.2.0.0 + 0.2.0.0 diff --git a/src/CommonUtil.lib.core/CommonUtil.lib.core.csproj b/src/CommonUtil.lib.core/CommonUtil.lib.core.csproj index 008cb71..d3cd342 100644 --- a/src/CommonUtil.lib.core/CommonUtil.lib.core.csproj +++ b/src/CommonUtil.lib.core/CommonUtil.lib.core.csproj @@ -1,13 +1,13 @@ - net5.0-windows + net6.0 core.audiamus.util audiamus.common.util.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.2.0.0 - 0.2.0.0 + 0.3.0.0 + 0.3.0.0 diff --git a/src/Connect.app.gui.core/BookLibConnect.odt b/src/Connect.app.gui.core/BookLibConnect.odt index a4b962a..6cf1f4c 100644 Binary files a/src/Connect.app.gui.core/BookLibConnect.odt and b/src/Connect.app.gui.core/BookLibConnect.odt differ diff --git a/src/Connect.app.gui.core/Connect.app.gui.core.csproj b/src/Connect.app.gui.core/Connect.app.gui.core.csproj index a2e37d2..4f4cb27 100644 --- a/src/Connect.app.gui.core/Connect.app.gui.core.csproj +++ b/src/Connect.app.gui.core/Connect.app.gui.core.csproj @@ -2,15 +2,15 @@ WinExe - net5.0-windows + net6.0-windows true audiamus BookLibConnect Book Lib Connect core.audiamus.connect.app.gui Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.8.0.0 - 0.8.0.0 + 0.9.0.0 + 0.9.0.0 Resources\audio.ico @@ -23,7 +23,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Connect.app.gui.core/Properties/PublishProfiles/FolderProfile.pubxml b/src/Connect.app.gui.core/Properties/PublishProfiles/FolderProfile.pubxml index eda5b17..e888339 100644 --- a/src/Connect.app.gui.core/Properties/PublishProfiles/FolderProfile.pubxml +++ b/src/Connect.app.gui.core/Properties/PublishProfiles/FolderProfile.pubxml @@ -1,17 +1,17 @@  - + Release Any CPU - bin\Release\net5.0-windows\publish\ + bin\Release\net6.0-windows\publish\ FileSystem - net5.0-windows + net6.0-windows win-x64 false - True - True + true + true \ No newline at end of file diff --git a/src/Connect.lib.core/AudibleApi.cs b/src/Connect.lib.core/AudibleApi.cs index 0495448..ccb19fb 100644 --- a/src/Connect.lib.core/AudibleApi.cs +++ b/src/Connect.lib.core/AudibleApi.cs @@ -124,17 +124,20 @@ const string GROUPS if (pageResult is null) return null; + if (Logging.Level >= 3) { + string file = pageResult.WriteTempJsonFile ("LibraryResponse"); + Log (3, this, () => $"page={page}, file=\"{Path.GetFileName (file)}\""); + } adb.json.LibraryResponse libraryResponse = adb.json.LibraryResponse.Deserialize (pageResult); + if (libraryResponse is null) + return null; + if (!(libraryResponse?.items.Any () ?? false)) break; var pageProducts = libraryResponse.items; Log (3, this, () => $"#items/page={pageProducts.Length}"); - if (Logging.Level >= 3) { - string file = pageResult.WriteTempJsonFile ("LibraryResponse"); - Log (3, this, () => $"page={page}, file=\"{Path.GetFileName (file)}\""); - } libProducts.AddRange (pageProducts); } } else { @@ -206,7 +209,7 @@ public async Task GetActivationBytesAsync () { adb.json.LicenseResponse license = adb.json.LicenseResponse.Deserialize (response); - decryptLicense (license.content_license); + decryptLicense (license?.content_license); return license; } @@ -224,7 +227,7 @@ public async Task GetDownloadLicenseAndSaveAsync (Conversion conversion, E return false; } - var lic = licresp.content_license; + var lic = licresp?.content_license; if (lic?.voucher is null) { conversion.State = EConversionState.license_denied; Log (3, this, () => $"{conversion}; license decryption failed."); @@ -368,9 +371,9 @@ void rename (string file, string suffix) { File.Move (file, sfxfile, true); } - void aaxFile_ConversionProgressUpdate (object sender, ConversionProgressEventArgs e) { + async void aaxFile_ConversionProgressUpdate (object sender, ConversionProgressEventArgs e) { if (cancToken.IsCancellationRequested) - aaxFile?.Cancel (); + await aaxFile?.CancelAsync (); progressAction.Invoke (conversion, e.ProcessPosition); } } @@ -479,6 +482,9 @@ private void decryptLicense (adb.json.ContentLicense license) { // See also //https://patchwork.ffmpeg.org/project/ffmpeg/patch/17559601585196510@sas2-2fa759678732.qloud-c.yandex.net/ + if (license is null) + return; + string hashable = Profile.DeviceInfo.Type + Profile.DeviceInfo.Serial + Profile.CustomerInfo.AccountId + license.asin; diff --git a/src/Connect.lib.core/Authorize.cs b/src/Connect.lib.core/Authorize.cs index 979400c..1e1ae62 100644 --- a/src/Connect.lib.core/Authorize.cs +++ b/src/Connect.lib.core/Authorize.cs @@ -374,6 +374,8 @@ internal bool updateProfile (Profile profile, string json) { jsonCleaned.WriteTempJsonFile (REGISTRATION + "(cleared)"); } var root = adb.json.RegistrationResponse.Deserialize (json); + if (root is null) + return false; var response = root.response; var success = response.success; diff --git a/src/Connect.lib.core/BookLibrary.cs b/src/Connect.lib.core/BookLibrary.cs index f8597b6..f6843b8 100644 --- a/src/Connect.lib.core/BookLibrary.cs +++ b/src/Connect.lib.core/BookLibrary.cs @@ -601,10 +601,10 @@ internal static void addChapters (BookDbContext dbContext, adb.json.ContentLicen comp.ChapterInfo = chapterInfo; } - chapterInfo.BrandIntroDurationMs = source.brandIntroDurationMs; - chapterInfo.BrandOutroDurationMs = source.brandOutroDurationMs; + chapterInfo.BrandIntroDurationMs = source.brandIntroDurationMs ?? 0; + chapterInfo.BrandOutroDurationMs = source.brandOutroDurationMs ?? 0; chapterInfo.IsAccurate = source.is_accurate; - chapterInfo.RuntimeLengthMs = source.runtime_length_ms; + chapterInfo.RuntimeLengthMs = source.runtime_length_ms ?? 0; if (source.chapters.IsNullOrEmpty ()) return; @@ -622,8 +622,8 @@ internal static void addChapters (BookDbContext dbContext, adb.json.ContentLicen } private static void setChapter (adb.json.Chapter src, Chapter chapter) { - chapter.LengthMs = src.length_ms; - chapter.StartOffsetMs = src.start_offset_ms; + chapter.LengthMs = src.length_ms ?? 0; + chapter.StartOffsetMs = src.start_offset_ms ?? 0; chapter.Title = src.title; } diff --git a/src/Connect.lib.core/Connect.lib.core.csproj b/src/Connect.lib.core/Connect.lib.core.csproj index 0e0d9cb..d1ea4f5 100644 --- a/src/Connect.lib.core/Connect.lib.core.csproj +++ b/src/Connect.lib.core/Connect.lib.core.csproj @@ -1,14 +1,14 @@ - net5.0-windows + net6.0 audiamus core.audiamus.connect audiamus.connect.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.8.0.0 - 0.8.0.0 + 0.9.0.0 + 0.9.0.0 @@ -20,9 +20,9 @@ - - - + + + diff --git a/src/Connect.ui.lib.core/Connect.ui.lib.core.csproj b/src/Connect.ui.lib.core/Connect.ui.lib.core.csproj index d137a79..ccc6f2f 100644 --- a/src/Connect.ui.lib.core/Connect.ui.lib.core.csproj +++ b/src/Connect.ui.lib.core/Connect.ui.lib.core.csproj @@ -1,14 +1,14 @@  - net5.0-windows + net6.0-windows true core.audiamus.connect.ui audiamus.connect.ui.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.8.0.0 - 0.8.0.0 + 0.9.0.0 + 0.9.0.0 diff --git a/src/InnoSetup/BookLibConnect setup.iss b/src/InnoSetup/BookLibConnect setup.iss index 73777ed..d382099 100644 --- a/src/InnoSetup/BookLibConnect setup.iss +++ b/src/InnoSetup/BookLibConnect setup.iss @@ -1,5 +1,5 @@ #define MyAppSetupName 'Book Lib Connect' -#define MyAppVersion '0.7' +#define MyAppVersion '0.9' #define MyProgramExe = 'BookLibConnect.exe' #define MyCompany = 'audiamus' #define MyAppName = 'BookLibConnect' @@ -18,7 +18,7 @@ OutputBaseFilename={#MyAppName}-{#MyAppVersion}-Setup DefaultGroupName={#MyCompany} DefaultDirName={autopf}\{#MyCompany}\{#MyAppSetupName} UninstallDisplayIcon={app}\{#MyProgramExe} -SourceDir=..\Connect.app.gui.core\bin\Release\net5.0-windows\publish +SourceDir=..\Connect.app.gui.core\bin\Release\net6.0-windows\publish OutputDir=..\..\..\Setup SolidCompression=yes diff --git a/src/PropGridLib.core/PropGridLib.core.csproj b/src/PropGridLib.core/PropGridLib.core.csproj index 57a3d94..d67bf86 100644 --- a/src/PropGridLib.core/PropGridLib.core.csproj +++ b/src/PropGridLib.core/PropGridLib.core.csproj @@ -1,14 +1,14 @@  - net5.0-windows + net6.0-windows true core.audiamus.aux.propgrid audiamus.aux.propgrid.core audiamus Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - 0.1.0.0 - 0.1.0.0 + 0.2.0.0 + 0.2.0.0 diff --git a/src/SystemMgmt.core/SystemMgmt.core.csproj b/src/SystemMgmt.core/SystemMgmt.core.csproj index f45ed66..14b942a 100644 --- a/src/SystemMgmt.core/SystemMgmt.core.csproj +++ b/src/SystemMgmt.core/SystemMgmt.core.csproj @@ -1,17 +1,17 @@ - net5.0-windows + net6.0 core.audiamus.sysmgmt audiamus.sysmgmt.core audiamus - 1.1.0.0 - 1.1.0.0 + 1.2.0.0 + 1.2.0.0 Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s"))) - + diff --git a/src/TreeDecomposition.core/TreeDecomposition.core.csproj b/src/TreeDecomposition.core/TreeDecomposition.core.csproj index 8b6d0d2..f45b020 100644 --- a/src/TreeDecomposition.core/TreeDecomposition.core.csproj +++ b/src/TreeDecomposition.core/TreeDecomposition.core.csproj @@ -1,12 +1,12 @@ - net5.0 + net6.0 core.core.audiamus.aux.diagn audiamus.aux.treedecomp.core audiamus - 2.0.0.0 - 2.0.0.0 + 2.1.0.0 + 2.1.0.0 Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))