mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-30 21:30:05 -06:00
FF-1785: Created a track remover based on the TrackSelectorFlowElement.cs
This commit is contained in:
@@ -45,6 +45,11 @@ public abstract class TrackSelectorFlowElement<T> : FfmpegBuilderNode where T :
|
||||
/// Gets the label for the custom selection
|
||||
/// </summary>
|
||||
protected virtual string CustomLabel => "Custom";
|
||||
/// <summary>
|
||||
/// Gets if this allows filtering by the index
|
||||
/// </summary>
|
||||
protected virtual bool AllowIndex => false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the track selection options
|
||||
@@ -65,6 +70,7 @@ public abstract class TrackSelectorFlowElement<T> : FfmpegBuilderNode where T :
|
||||
{
|
||||
if (_TrackSelectionOptionsOptions == null)
|
||||
{
|
||||
var instance = (T)Activator.CreateInstance(typeof(T))!;
|
||||
_TrackSelectionOptionsOptions = new List<ListOption>
|
||||
{
|
||||
new() { Label = "Channels", Value = "Channels" },
|
||||
@@ -72,6 +78,8 @@ public abstract class TrackSelectorFlowElement<T> : FfmpegBuilderNode where T :
|
||||
new() { Label = "Language", Value = "Language" },
|
||||
new() { Label = "Title", Value = "Title" }
|
||||
};
|
||||
if(instance.AllowIndex)
|
||||
_TrackSelectionOptionsOptions.Add(new () { Label = "Index", Value = "Index"});
|
||||
}
|
||||
|
||||
return _TrackSelectionOptionsOptions;
|
||||
|
||||
@@ -20,6 +20,8 @@ public class FfmpegBuilderTrackRemover: TrackSelectorFlowElement<FfmpegBuilderT
|
||||
protected override string AutomaticLabel => "All";
|
||||
/// <inheritdoc />
|
||||
protected override string CustomLabel => "Matching";
|
||||
/// <inheritdoc />
|
||||
protected override bool AllowIndex => true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the stream types to remove
|
||||
|
||||
Reference in New Issue
Block a user