public AaxcDownloadConverter(string outFileName, string cacheDirectory, DownloadLicense dlLic, OutputFormat outputFormat) { ArgumentValidator.EnsureNotNullOrWhiteSpace(outFileName, nameof(outFileName)); OutputFileName = outFileName; var outDir = Path.GetDirectoryName(OutputFileName); if (!Directory.Exists(outDir)) { throw new ArgumentNullException(nameof(outDir), "Directory does not exist"); } if (File.Exists(OutputFileName)) { File.Delete(OutputFileName); } if (!Directory.Exists(cacheDirectory)) { throw new ArgumentNullException(nameof(cacheDirectory), "Directory does not exist"); } cacheDir = cacheDirectory; downloadLicense = ArgumentValidator.EnsureNotNull(dlLic, nameof(dlLic)); OutputFormat = outputFormat; steps = new StepSequence { Name = "Download and Convert Aaxc To " + (outputFormat == OutputFormat.Mp4a ? "M4b" : "Mp3"), ["Step 1: Get Aaxc Metadata"] = Step1_GetMetadata, ["Step 2: Download Decrypted Audiobook"] = Step2_DownloadAndCombine, ["Step 3: Create Cue"] = Step3_CreateCue, ["Step 4: Create Nfo"] = Step4_CreateNfo, ["Step 5: Cleanup"] = Step5_Cleanup, }; }
public AaxcDownloadMultiConverter(string outFileName, string cacheDirectory, DownloadLicense dlLic, OutputFormat outputFormat, Func <MultiConvertFileProperties, string> multipartFileNameCallback = null) : base(outFileName, cacheDirectory, dlLic, outputFormat) { Steps = new StepSequence { Name = "Download and Convert Aaxc To " + OutputFormat, ["Step 1: Get Aaxc Metadata"] = Step_GetMetadata, ["Step 2: Download Decrypted Audiobook"] = Step_DownloadAudiobookAsMultipleFilesPerChapter, ["Step 3: Cleanup"] = Step_Cleanup, }; this.multipartFileNameCallback = multipartFileNameCallback ?? MultiConvertFileProperties.DefaultMultipartFilename; }
protected AaxcDownloadConvertBase(string outFileName, string cacheDirectory, DownloadLicense dlLic, OutputFormat outputFormat) : base(outFileName, cacheDirectory, dlLic) { OutputFormat = outputFormat; }
public UnencryptedAudiobookDownloader(string outFileName, string cacheDirectory, DownloadLicense dlLic) : base(outFileName, cacheDirectory, dlLic) { Steps = new StepSequence { Name = "Download Mp3 Audiobook", ["Step 1: Get Mp3 Metadata"] = Step_GetMetadata, ["Step 2: Download Audiobook"] = Step_DownloadAudiobookAsSingleFile, ["Step 3: Create Cue"] = Step_CreateCue, ["Step 4: Cleanup"] = Step_Cleanup, }; }
public AaxcDownloadSingleConverter(string outFileName, string cacheDirectory, DownloadLicense dlLic, OutputFormat outputFormat) : base(outFileName, cacheDirectory, dlLic, outputFormat) { Steps = new StepSequence { Name = "Download and Convert Aaxc To " + OutputFormat, ["Step 1: Get Aaxc Metadata"] = Step_GetMetadata, ["Step 2: Download Decrypted Audiobook"] = Step_DownloadAudiobookAsSingleFile, ["Step 3: Create Cue"] = Step_CreateCue, ["Step 4: Cleanup"] = Step_Cleanup, }; }