Crunchy-Downloader/CRD/Utils/Muxing/Commands/CommandBuilder.cs
Elwador c4ba220d1b - Added **UseDefaults toggle** for endpoints to choose between **app defaults** (auto-updated with new releases) or **custom parameters**
- 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
2026-03-24 12:15:22 +01:00

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);
}
}