|
|
|
|
@ -88,6 +88,12 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => {
|
|
|
|
|
const valuesToRemove = String(args.inputs.valuesToRemove).trim().split(',');
|
|
|
|
|
const condition = String(args.inputs.condition);
|
|
|
|
|
|
|
|
|
|
const valuesToRemoveTrimed: Array<string> = [];
|
|
|
|
|
valuesToRemove.forEach((element) => {
|
|
|
|
|
const trimedElement = element.trim();
|
|
|
|
|
valuesToRemoveTrimed.push(trimedElement);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
args.variables.ffmpegCommand.streams.forEach((stream) => {
|
|
|
|
|
let target = '';
|
|
|
|
|
if (propertyToCheck.includes('.')) {
|
|
|
|
|
@ -99,9 +105,8 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => {
|
|
|
|
|
|
|
|
|
|
if (target) {
|
|
|
|
|
const prop = String(target).toLowerCase();
|
|
|
|
|
for (let i = 0; i < valuesToRemove.length; i += 1) {
|
|
|
|
|
const val = valuesToRemove[i].toLowerCase();
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < valuesToRemoveTrimed.length; i += 1) {
|
|
|
|
|
const val = valuesToRemoveTrimed[i].toLowerCase();
|
|
|
|
|
const prefix = `Removing stream index ${stream.index} because ${propertyToCheck} of ${prop}`;
|
|
|
|
|
if (condition === 'includes' && prop.includes(val)) {
|
|
|
|
|
args.jobLog(`${prefix} includes ${val}\n`);
|
|
|
|
|
|