mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-16 10:45:53 -07:00
Allow original container option
This commit is contained in:
parent
61318fe145
commit
7d3b4f3bd7
1 changed files with 5 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.plugin = exports.details = void 0;
|
exports.plugin = exports.details = void 0;
|
||||||
var fs_1 = require("fs");
|
var fs_1 = require("fs");
|
||||||
var cliUtils_1 = require("../../../../FlowHelpers/1.0.0/cliUtils");
|
var cliUtils_1 = require("../../../../FlowHelpers/1.0.0/cliUtils");
|
||||||
|
var fileUtils_1 = require("../../../../FlowHelpers/1.0.0/fileUtils");
|
||||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||||
var details = function () { return ({
|
var details = function () { return ({
|
||||||
name: 'HandBrake Custom Arguments',
|
name: 'HandBrake Custom Arguments',
|
||||||
|
|
@ -76,6 +77,7 @@ var details = function () { return ({
|
||||||
inputUI: {
|
inputUI: {
|
||||||
type: 'dropdown',
|
type: 'dropdown',
|
||||||
options: [
|
options: [
|
||||||
|
'original',
|
||||||
'mkv',
|
'mkv',
|
||||||
'mp4',
|
'mp4',
|
||||||
'm4v',
|
'm4v',
|
||||||
|
|
@ -107,6 +109,9 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
|
||||||
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
||||||
customArguments = String(args.inputs.customArguments);
|
customArguments = String(args.inputs.customArguments);
|
||||||
container = String(args.inputs.container);
|
container = String(args.inputs.container);
|
||||||
|
if (container === 'original') {
|
||||||
|
container = (0, fileUtils_1.getContainer)(args.inputFileObj._id);
|
||||||
|
}
|
||||||
outputFilePath = "".concat(args.workDir, "/tempFile_").concat(new Date().getTime(), ".").concat(container);
|
outputFilePath = "".concat(args.workDir, "/tempFile_").concat(new Date().getTime(), ".").concat(container);
|
||||||
presetString = String(args.inputs.jsonPreset);
|
presetString = String(args.inputs.jsonPreset);
|
||||||
cliArgs = [
|
cliArgs = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue