Allow caller to specify alternate chapters source.
This commit is contained in:
parent
ebfdd44142
commit
9271114408
@ -62,9 +62,10 @@ namespace AaxDecrypter
|
|||||||
public Tags tags { get; private set; }
|
public Tags tags { get; private set; }
|
||||||
public EncodingInfo encodingInfo { get; private set; }
|
public EncodingInfo encodingInfo { get; private set; }
|
||||||
|
|
||||||
public static async Task<AaxToM4bConverter> CreateAsync(string inputFile, string decryptKey)
|
public static async Task<AaxToM4bConverter> CreateAsync(string inputFile, string decryptKey, Chapters chapters = null)
|
||||||
{
|
{
|
||||||
var converter = new AaxToM4bConverter(inputFile, decryptKey);
|
var converter = new AaxToM4bConverter(inputFile, decryptKey);
|
||||||
|
converter.chapters = chapters ?? new AAXChapters(inputFile);
|
||||||
await converter.prelimProcessing();
|
await converter.prelimProcessing();
|
||||||
converter.printPrelim();
|
converter.printPrelim();
|
||||||
|
|
||||||
@ -98,7 +99,6 @@ namespace AaxDecrypter
|
|||||||
{
|
{
|
||||||
tags = new Tags(inputFileName);
|
tags = new Tags(inputFileName);
|
||||||
encodingInfo = new EncodingInfo(inputFileName);
|
encodingInfo = new EncodingInfo(inputFileName);
|
||||||
chapters = new AAXChapters(inputFileName);
|
|
||||||
|
|
||||||
var defaultFilename = Path.Combine(
|
var defaultFilename = Path.Combine(
|
||||||
Path.GetDirectoryName(inputFileName),
|
Path.GetDirectoryName(inputFileName),
|
||||||
|
|||||||
@ -17,6 +17,10 @@ namespace AaxDecrypter
|
|||||||
{
|
{
|
||||||
_chapterList.Add(chapter);
|
_chapterList.Add(chapter);
|
||||||
}
|
}
|
||||||
|
protected void AddChapters(IEnumerable<Chapter> chapters)
|
||||||
|
{
|
||||||
|
_chapterList.AddRange(chapters);
|
||||||
|
}
|
||||||
public string GenerateFfmpegChapters()
|
public string GenerateFfmpegChapters()
|
||||||
{
|
{
|
||||||
var stringBuilder = new StringBuilder();
|
var stringBuilder = new StringBuilder();
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
<!-- <PublishSingleFile>true</PublishSingleFile> -->
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
|
|
||||||
<Version>4.2.4.1</Version>
|
<Version>4.2.4.3</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user