mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-04-22 01:11:58 +00:00
- Added **authentication parameters** to the **Android TV endpoint** - Changed **parser and HLS download handling** to support the new manifest/codec format - Refactored **MKVMerge and FFmpeg command building** - Updated android tv token
32 lines
No EOL
786 B
C#
32 lines
No EOL
786 B
C#
using System.Collections.Generic;
|
|
using CRD.Utils.Muxing.Structs;
|
|
|
|
namespace CRD.Utils.Muxing.Commands;
|
|
|
|
public abstract class CommandBuilder{
|
|
private protected readonly MergerOptions Options;
|
|
private protected readonly List<string> Args = new();
|
|
|
|
public CommandBuilder(MergerOptions options){
|
|
Options = options;
|
|
}
|
|
|
|
public abstract string Build();
|
|
|
|
private protected void Add(string arg){
|
|
Args.Add(arg);
|
|
}
|
|
|
|
private protected void AddIf(bool condition, string arg){
|
|
if (condition)
|
|
Add(arg);
|
|
}
|
|
|
|
private protected void AddInput(string path){
|
|
Add($"\"{Helpers.AddUncPrefixIfNeeded(path)}\"");
|
|
}
|
|
|
|
private protected void AddRange(IEnumerable<string> args){
|
|
Args.AddRange(args);
|
|
}
|
|
} |