Merge pull request #69 from Mbucari/master

Added logging of download license.
This commit is contained in:
rmcrackan 2021-07-24 19:56:55 -04:00 committed by GitHub
commit ad09d36588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
using Dinah.Core; using Dinah.Core;
using Dinah.Core.Diagnostics; using Dinah.Core.Diagnostics;
using Dinah.Core.IO; using Dinah.Core.IO;
using Dinah.Core.Logging;
using Dinah.Core.StepRunner; using Dinah.Core.StepRunner;
using System; using System;
using System.IO; using System.IO;
@ -39,6 +40,7 @@ namespace AaxDecrypter
ArgumentValidator.EnsureNotNullOrWhiteSpace(outFileName, nameof(outFileName)); ArgumentValidator.EnsureNotNullOrWhiteSpace(outFileName, nameof(outFileName));
OutputFileName = outFileName; OutputFileName = outFileName;
var outDir = Path.GetDirectoryName(OutputFileName); var outDir = Path.GetDirectoryName(OutputFileName);
if (!Directory.Exists(outDir)) if (!Directory.Exists(outDir))
throw new ArgumentNullException(nameof(outDir), "Directory does not exist"); throw new ArgumentNullException(nameof(outDir), "Directory does not exist");
if (File.Exists(OutputFileName)) if (File.Exists(OutputFileName))
@ -51,6 +53,8 @@ namespace AaxDecrypter
downloadLicense = ArgumentValidator.EnsureNotNull(dlLic, nameof(dlLic)); downloadLicense = ArgumentValidator.EnsureNotNull(dlLic, nameof(dlLic));
OutputFormat = outputFormat; OutputFormat = outputFormat;
Serilog.Log.Logger.Verbose("Download License. {@DebugInfo}", downloadLicense);
steps = new StepSequence steps = new StepSequence
{ {
Name = "Download and Convert Aaxc To " + (outputFormat == OutputFormat.Mp4a ? "M4b" : "Mp3"), Name = "Download and Convert Aaxc To " + (outputFormat == OutputFormat.Mp4a ? "M4b" : "Mp3"),