mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-16 18:45:53 -07:00
Set shouldProcess
This commit is contained in:
parent
8cfd142168
commit
e54e89884b
2 changed files with 13 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.plugin = exports.details = void 0;
|
exports.plugin = exports.details = void 0;
|
||||||
|
var fileUtils_1 = require("../../../../FlowHelpers/1.0.0/fileUtils");
|
||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
var details = function () { return ({
|
var details = function () { return ({
|
||||||
name: 'Set Container',
|
name: 'Set Container',
|
||||||
|
|
@ -41,7 +42,11 @@ var plugin = function (args) {
|
||||||
var lib = require('../../../../../methods/lib')();
|
var lib = require('../../../../../methods/lib')();
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
||||||
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
||||||
args.variables.ffmpegCommand.container = String(args.inputs.container);
|
var newContainer = String(args.inputs.container);
|
||||||
|
if ((0, fileUtils_1.getContainer)(args.inputFileObj._id) !== args.inputs.container) {
|
||||||
|
args.variables.ffmpegCommand.container = newContainer;
|
||||||
|
args.variables.ffmpegCommand.shouldProcess = true;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
outputFileObj: args.inputFileObj,
|
outputFileObj: args.inputFileObj,
|
||||||
outputNumber: 1,
|
outputNumber: 1,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||||
|
|
||||||
|
import { getContainer } from '../../../../FlowHelpers/1.0.0/fileUtils';
|
||||||
import {
|
import {
|
||||||
IpluginDetails,
|
IpluginDetails,
|
||||||
IpluginInputArgs,
|
IpluginInputArgs,
|
||||||
|
|
@ -46,7 +47,12 @@ const plugin = (args:IpluginInputArgs):IpluginOutputArgs => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-param-reassign
|
||||||
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
||||||
|
|
||||||
args.variables.ffmpegCommand.container = String(args.inputs.container);
|
const newContainer = String(args.inputs.container);
|
||||||
|
|
||||||
|
if (getContainer(args.inputFileObj._id) !== args.inputs.container) {
|
||||||
|
args.variables.ffmpegCommand.container = newContainer;
|
||||||
|
args.variables.ffmpegCommand.shouldProcess = true;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
outputFileObj: args.inputFileObj,
|
outputFileObj: args.inputFileObj,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue