61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
using AAXClean;
|
|
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
#nullable enable
|
|
namespace AaxDecrypter
|
|
{
|
|
public class KeyData
|
|
{
|
|
public byte[] KeyPart1 { get; }
|
|
public byte[]? KeyPart2 { get; }
|
|
|
|
public KeyData(byte[] keyPart1, byte[]? keyPart2 = null)
|
|
{
|
|
KeyPart1 = keyPart1;
|
|
KeyPart2 = keyPart2;
|
|
}
|
|
|
|
public KeyData(string keyPart1, string? keyPart2 = null)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(keyPart1, nameof(keyPart1));
|
|
KeyPart1 = Convert.FromBase64String(keyPart1);
|
|
if (keyPart2 != null)
|
|
KeyPart2 = Convert.FromBase64String(keyPart2);
|
|
}
|
|
}
|
|
|
|
public interface IDownloadOptions
|
|
{
|
|
event EventHandler<long> DownloadSpeedChanged;
|
|
string DownloadUrl { get; }
|
|
string UserAgent { get; }
|
|
KeyData[]? DecryptionKeys { get; }
|
|
TimeSpan RuntimeLength { get; }
|
|
OutputFormat OutputFormat { get; }
|
|
bool TrimOutputToChapterLength { get; }
|
|
bool RetainEncryptedFile { get; }
|
|
bool StripUnabridged { get; }
|
|
bool CreateCueSheet { get; }
|
|
bool DownloadClipsBookmarks { get; }
|
|
long DownloadSpeedBps { get; }
|
|
ChapterInfo ChapterInfo { get; }
|
|
bool FixupFile { get; }
|
|
string? AudibleProductId { get; }
|
|
string? Title { get; }
|
|
string? Subtitle { get; }
|
|
string? Publisher { get; }
|
|
string? Language { get; }
|
|
string? SeriesName { get; }
|
|
float? SeriesNumber { get; }
|
|
NAudio.Lame.LameConfig? LameConfig { get; }
|
|
bool Downsample { get; }
|
|
bool MatchSourceBitrate { get; }
|
|
bool MoveMoovToBeginning { get; }
|
|
string GetMultipartFileName(MultiConvertFileProperties props);
|
|
string GetMultipartTitle(MultiConvertFileProperties props);
|
|
Task<string> SaveClipsAndBookmarksAsync(string fileName);
|
|
public FileType? InputType { get; }
|
|
}
|
|
}
|