|
|
|
|
@ -1,14 +1,10 @@
|
|
|
|
|
/* eslint-disable max-len */
|
|
|
|
|
|
|
|
|
|
const fs = require('fs');
|
|
|
|
|
const path = require('path');
|
|
|
|
|
const loadDefaultValues = require('../methods/loadDefaultValues');
|
|
|
|
|
|
|
|
|
|
const details = () => ({
|
|
|
|
|
id: 'Tdarr_Plugin_rename_based_on_codec_schadi',
|
|
|
|
|
Stage: 'Post-processing',
|
|
|
|
|
Name: 'Rename based on codec Video and Audio',
|
|
|
|
|
Type: 'Video_Audio',
|
|
|
|
|
Type: 'Video',
|
|
|
|
|
Operation: 'Transcode',
|
|
|
|
|
Description: `
|
|
|
|
|
If the filename contains a codec information like h264, av1 or similar for video and AC3, AAC or trueHD \n\n
|
|
|
|
|
@ -53,7 +49,7 @@ const details = () => ({
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'additional_extensions',
|
|
|
|
|
type: 'text',
|
|
|
|
|
type: 'string',
|
|
|
|
|
defaultValue: '.nfo,.srt',
|
|
|
|
|
inputUI: {
|
|
|
|
|
type: 'text',
|
|
|
|
|
@ -67,8 +63,13 @@ const details = () => ({
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
|
|
const plugin = (file, librarySettings, inputs, otherArguments) => {
|
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
|
inputs = loadDefaultValues(inputs, details);
|
|
|
|
|
const lib = require('../methods/lib')();
|
|
|
|
|
// eslint-disable-next-line no-unused-vars,no-param-reassign
|
|
|
|
|
inputs = lib.loadDefaultValues(inputs, details);
|
|
|
|
|
|
|
|
|
|
const fs = require('fs');
|
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
|
|
const fileNameOld = file._id;
|
|
|
|
|
|
|
|
|
|
const response = {
|
|
|
|
|
|