Skip to content

Commit

Permalink
Version 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
audiamus committed Jul 10, 2022
1 parent df63b30 commit 6373421
Show file tree
Hide file tree
Showing 24 changed files with 104 additions and 92 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ _**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.
Be cautious with uploading log files to these sections as they may contain sensitive data.

## 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.
Expand Down
6 changes: 3 additions & 3 deletions res/Setup.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
6 changes: 3 additions & 3 deletions src/Audible.json.core/Audible.json.core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>core.audiamus.adb.json</RootNamespace>
<AssemblyName>audiamus.audiible.json.core</AssemblyName>
<Authors>audiamus</Authors>
<Copyright>Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
<AssemblyVersion>0.4.0.0</AssemblyVersion>
<FileVersion>0.4.0.0</FileVersion>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Audible.json.core/LibraryResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
20 changes: 10 additions & 10 deletions src/Audible.json.core/LicenseResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand All @@ -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; }
}
Expand All @@ -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; }
}
}
8 changes: 4 additions & 4 deletions src/AuxLib.core/AuxLib.core.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>core.audiamus.aux</RootNamespace>
<AssemblyName>audiamus.aux.core</AssemblyName>
<Authors>audiamus</Authors>
<AssemblyVersion>2.1.0.1</AssemblyVersion>
<FileVersion>2.1.0.1</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions src/AuxWin.DialogBox.core/AuxWin.DialogBox.core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>core.audiamus.aux.win</RootNamespace>
<AssemblyName>audiamus.aux.win.dialogbox.core</AssemblyName>
<Authors>audiamus</Authors>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<Copyright>Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/AuxWin.lib.core/AuxWin.lib.core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<RootNamespace>core.audiamus.aux.win</RootNamespace>
<AssemblyName>audiamus.aux.win.core</AssemblyName>
<Authors>audiamus</Authors>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
</PropertyGroup>

Expand Down
10 changes: 7 additions & 3 deletions src/AuxWin32Lib.core/AuxWin32Lib.core.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>core.audiamus.aux.w32</RootNamespace>
<AssemblyName>audiamus.aux.w32.core</AssemblyName>
<Authors>audiamus</Authors>
<AssemblyVersion>2.1.1.0</AssemblyVersion>
<FileVersion>2.1.1.0</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<Copyright>Copyright © 2019 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
</PropertyGroup>

Expand All @@ -22,4 +22,8 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SystemMgmt.core\SystemMgmt.core.csproj" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions src/BooksDatabase.core/BooksDatabase.core.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>core.audiamus.booksdb</RootNamespace>
<AssemblyName>audiamus.booksdb.core</AssemblyName>
<Authors>audiamus</Authors>
<Copyright>Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
<AssemblyVersion>0.5.0.0</AssemblyVersion>
<FileVersion>0.5.0.0</FileVersion>
<AssemblyVersion>0.6.0.0</AssemblyVersion>
<FileVersion>0.6.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.11">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.11" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.11">
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
6 changes: 3 additions & 3 deletions src/CommonTypes.lib.core/CommonTypes.lib.core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>core.audiamus.common</RootNamespace>
<AssemblyName>audiamus.common.types.core</AssemblyName>
<Authors>audiamus</Authors>
<Copyright>Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
<AssemblyVersion>0.1.0.0</AssemblyVersion>
<FileVersion>0.1.0.0</FileVersion>
<AssemblyVersion>0.2.0.0</AssemblyVersion>
<FileVersion>0.2.0.0</FileVersion>
</PropertyGroup>

</Project>
6 changes: 3 additions & 3 deletions src/CommonUtil.lib.core/CommonUtil.lib.core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>core.audiamus.util</RootNamespace>
<AssemblyName>audiamus.common.util.core</AssemblyName>
<Authors>audiamus</Authors>
<Copyright>Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
<AssemblyVersion>0.2.0.0</AssemblyVersion>
<FileVersion>0.2.0.0</FileVersion>
<AssemblyVersion>0.3.0.0</AssemblyVersion>
<FileVersion>0.3.0.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Binary file modified src/Connect.app.gui.core/BookLibConnect.odt
Binary file not shown.
8 changes: 4 additions & 4 deletions src/Connect.app.gui.core/Connect.app.gui.core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<Authors>audiamus</Authors>
<AssemblyName>BookLibConnect</AssemblyName>
<AssemblyTitle>Book Lib Connect</AssemblyTitle>
<RootNamespace>core.audiamus.connect.app.gui</RootNamespace>
<Copyright>Copyright © 2021 - $([System.DateTime]::UtcNow.Year) audiamus ($([System.DateTime]::UtcNow.ToString("s")))</Copyright>
<AssemblyVersion>0.8.0.0</AssemblyVersion>
<FileVersion>0.8.0.0</FileVersion>
<AssemblyVersion>0.9.0.0</AssemblyVersion>
<FileVersion>0.9.0.0</FileVersion>
<ApplicationIcon>Resources\audio.ico</ApplicationIcon>
</PropertyGroup>

Expand All @@ -23,7 +23,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.11">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net5.0-windows\publish\</PublishDir>
<PublishDir>bin\Release\net6.0-windows\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>false</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>
22 changes: 14 additions & 8 deletions src/Connect.lib.core/AudibleApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -206,7 +209,7 @@ public async Task<bool> GetActivationBytesAsync () {

adb.json.LicenseResponse license = adb.json.LicenseResponse.Deserialize (response);

decryptLicense (license.content_license);
decryptLicense (license?.content_license);

return license;
}
Expand All @@ -224,7 +227,7 @@ public async Task<bool> 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.");
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -479,6 +482,9 @@ private void decryptLicense (adb.json.ContentLicense license) {
// See also
//https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/

if (license is null)
return;

string hashable = Profile.DeviceInfo.Type + Profile.DeviceInfo.Serial + Profile.CustomerInfo.AccountId +
license.asin;

Expand Down
2 changes: 2 additions & 0 deletions src/Connect.lib.core/Authorize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 6373421

Please sign in to comment.