Move files

This commit is contained in:
Sean Kelly 2021-09-30 19:44:32 +13:00
parent 13294d3414
commit 4b78b757aa
4 changed files with 13 additions and 8 deletions

View File

@ -25,8 +25,12 @@ namespace AaxDecrypter
Name = "Download and Convert Aaxc To " + OutputFormat,
["Step 1: Get Aaxc Metadata"] = Step1_GetMetadata,
["Step 2: Download Decrypted Audiobook"] = splitFileByChapters ? Step2_DownloadAudiobookAsMultipleFilesPerChapter : Step2_DownloadAudiobookAsSingleFile,
["Step 3: Create Cue"] = Step3_CreateCue,
["Step 2: Download Decrypted Audiobook"] = splitFileByChapters
? Step2_DownloadAudiobookAsMultipleFilesPerChapter
: Step2_DownloadAudiobookAsSingleFile,
["Step 3: Create Cue"] = splitFileByChapters
? () => true
: Step3_CreateCue,
["Step 4: Cleanup"] = Step4_Cleanup,
};
}
@ -64,7 +68,7 @@ namespace AaxDecrypter
OnDecryptProgressUpdate(zeroProgress);
aaxFile.SetDecryptionKey(downloadLicense.AudibleKey, downloadLicense.AudibleIV);
@ -118,6 +122,7 @@ namespace AaxDecrypter
var chapterCount = 0;
aaxFile.ConvertToMultiMp4a(downloadLicense.ChapterInfo, newSplitCallback =>
{
// TODO I need to find a way to inject the track number into the m4b file. It's easier with the MP3.
chapterCount++;
var fileName = Path.ChangeExtension(outputFileName, $"{chapterCount}.m4b");
if (File.Exists(fileName))

View File

@ -59,7 +59,7 @@ namespace AaxDecrypter
public abstract void Cancel();
protected abstract int GetSpeedup(TimeSpan elapsed);
protected abstract bool Step2_DownloadAudiobookAsSingleFile(); //TODO do I need to change this??
protected abstract bool Step2_DownloadAudiobookAsSingleFile();
protected abstract bool Step1_GetMetadata();
public virtual void SetCoverArt(byte[] coverArt)

View File

@ -7,10 +7,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSBump" Version="2.3.2">
<!--<PackageReference Include="MSBump" Version="2.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</PackageReference>-->
<PackageReference Include="Octokit" Version="0.50.0" />
</ItemGroup>

View File

@ -155,8 +155,8 @@ namespace FileLiberator
foreach (var f in sortedFiles)
{
var dest
= AudibleFileStorage.Audio.IsFileTypeMatch(f)
? audioFileName
= f.Extension.Equals($".{musicFileExt}", StringComparison.OrdinalIgnoreCase)
? Path.Join(destinationDir, f.Name)
// non-audio filename: safetitle_limit50char + " [" + productId + "][" + audio_ext + "]." + non_audio_ext
: FileUtility.GetValidFilename(destinationDir, product.Title, f.Extension, product.AudibleProductId, musicFileExt);