mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Allow original container option
This commit is contained in:
parent
d6a61806d0
commit
61318fe145
1 changed files with 8 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
IpluginInputArgs,
|
||||
IpluginOutputArgs,
|
||||
} from '../../../../FlowHelpers/1.0.0/interfaces/interfaces';
|
||||
import { getContainer } from '../../../../FlowHelpers/1.0.0/fileUtils';
|
||||
|
||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||
const details = ():IpluginDetails => ({
|
||||
|
|
@ -43,6 +44,7 @@ const details = ():IpluginDetails => ({
|
|||
inputUI: {
|
||||
type: 'dropdown',
|
||||
options: [
|
||||
'original',
|
||||
'mkv',
|
||||
'mp4',
|
||||
'm4v',
|
||||
|
|
@ -70,7 +72,12 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
args.inputs = lib.loadDefaultValues(args.inputs, details);
|
||||
|
||||
const customArguments = String(args.inputs.customArguments);
|
||||
const container = String(args.inputs.container);
|
||||
|
||||
let container = String(args.inputs.container);
|
||||
|
||||
if (container === 'original') {
|
||||
container = getContainer(args.inputFileObj._id);
|
||||
}
|
||||
|
||||
const outputFilePath = `${args.workDir}/tempFile_${new Date().getTime()}.${container}`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue