mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-17 03:06:27 -07:00
Use getContainer
This commit is contained in:
parent
e54e89884b
commit
a621a0c459
2 changed files with 4 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ var __assign = (this && this.__assign) || function () {
|
||||||
};
|
};
|
||||||
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: 'Begin Command',
|
name: 'Begin Command',
|
||||||
|
|
@ -39,8 +40,7 @@ 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);
|
||||||
var containerParts = args.inputFileObj._id.split('.');
|
var container = (0, fileUtils_1.getContainer)(args.inputFileObj._id);
|
||||||
var container = containerParts[containerParts.length - 1];
|
|
||||||
var ffmpegCommand = {
|
var ffmpegCommand = {
|
||||||
inputFiles: [],
|
inputFiles: [],
|
||||||
streams: JSON.parse(JSON.stringify(args.inputFileObj.ffProbeData.streams)).map(function (stream) { return (__assign(__assign({}, stream), { removed: false, mapArgs: [
|
streams: JSON.parse(JSON.stringify(args.inputFileObj.ffProbeData.streams)).map(function (stream) { return (__assign(__assign({}, stream), { removed: false, mapArgs: [
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
@ -16,7 +17,6 @@ const details = () :IpluginDetails => ({
|
||||||
borderColor: 'green',
|
borderColor: 'green',
|
||||||
},
|
},
|
||||||
tags: 'video',
|
tags: 'video',
|
||||||
|
|
||||||
isStartPlugin: false,
|
isStartPlugin: false,
|
||||||
sidebarPosition: 1,
|
sidebarPosition: 1,
|
||||||
icon: '',
|
icon: '',
|
||||||
|
|
@ -35,8 +35,7 @@ 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);
|
||||||
|
|
||||||
const containerParts = args.inputFileObj._id.split('.');
|
const container = getContainer(args.inputFileObj._id);
|
||||||
const container = containerParts[containerParts.length - 1];
|
|
||||||
|
|
||||||
const ffmpegCommand = {
|
const ffmpegCommand = {
|
||||||
inputFiles: [],
|
inputFiles: [],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue