Skip to content

Commit

Permalink
Merge pull request #588 from Mbucari/master
Browse files Browse the repository at this point in the history
Use old activation bytes if present.
  • Loading branch information
Mbucari authored Apr 18, 2023
2 parents 48c69a1 + fe534b3 commit ea9e36f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Source/AaxDecrypter/AaxcDownloadConvertBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ public override async Task CancelAsync()
protected bool Step_GetMetadata()
{
AaxFile = new AaxFile(InputFileStream);
AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey, DownloadOptions.AudibleIV);

if (DownloadOptions.AudibleKey?.Length == 8 && DownloadOptions.AudibleIV is null)
AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey);
else
AaxFile.SetDecryptionKey(DownloadOptions.AudibleKey, DownloadOptions.AudibleIV);

if (DownloadOptions.StripUnabridged)
{
Expand Down
1 change: 0 additions & 1 deletion Source/AaxDecrypter/AudiobookDownloadBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ private async Task<bool> CleanupAsync()
FileUtility.SaferDelete(jsonDownloadState);

if (!string.IsNullOrEmpty(DownloadOptions.AudibleKey) &&
!string.IsNullOrEmpty(DownloadOptions.AudibleIV) &&
DownloadOptions.RetainEncryptedFile)
{
string aaxPath = Path.ChangeExtension(tempFilePath, ".aax");
Expand Down
2 changes: 1 addition & 1 deletion Source/AudibleUtilities/AudibleUtilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AudibleApi" Version="8.3.0.1" />
<PackageReference Include="AudibleApi" Version="8.4.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit ea9e36f

Please sign in to comment.