mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Create Tdarr_Plugin_0house_action_remux_container.js
This commit is contained in:
parent
5789b4be5f
commit
1e81b22b10
1 changed files with 62 additions and 0 deletions
62
Community/Tdarr_Plugin_0house_action_remux_container.js
Normal file
62
Community/Tdarr_Plugin_0house_action_remux_container.js
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
const details = () => ({
|
||||
id: 'Tdarr_Plugin_0house_action_remux_container',
|
||||
Stage: 'Pre-processing',
|
||||
Name: 'Remux container',
|
||||
Type: 'Video',
|
||||
Operation: 'Transcode',
|
||||
Description: `
|
||||
This action has a built-in filter. Additional filters can be added.
|
||||
|
||||
If not in the specified container, the file will be remuxed.
|
||||
`,
|
||||
Version: '1.00',
|
||||
Tags: 'filter',
|
||||
Inputs: [
|
||||
{
|
||||
name: 'container',
|
||||
type: 'string',
|
||||
defaultValue: 'mkv',
|
||||
inputUI: {
|
||||
type: 'text',
|
||||
},
|
||||
tooltip:
|
||||
'Enter the desired container',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
||||
// eslint-disable-next-line global-require
|
||||
const lib = require('../methods/lib')();
|
||||
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
||||
inputs = lib.loadDefaultValues(inputs, details);
|
||||
const response = {
|
||||
processFile: false,
|
||||
preset: '',
|
||||
container: '',
|
||||
handBrakeMode: false,
|
||||
FFmpegMode: false,
|
||||
reQueueAfter: false,
|
||||
infoLog: '',
|
||||
};
|
||||
|
||||
const { container } = inputs;
|
||||
|
||||
const remuxContainer = lib.actions.remuxContainer(
|
||||
file,
|
||||
container,
|
||||
);
|
||||
|
||||
response.preset = ', -map 0 -c copy';
|
||||
response.container = '.mkv';
|
||||
response.handbrakeMode = false;
|
||||
response.FFmpegMode = true;
|
||||
response.reQueueAfter = true;
|
||||
response.processFile = remuxContainer.processFile;
|
||||
response.infoLog += remuxContainer.note;
|
||||
return response;
|
||||
};
|
||||
|
||||
module.exports.details = details;
|
||||
module.exports.plugin = plugin;
|
||||
Loading…
Add table
Add a link
Reference in a new issue