mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Beta plugins
This commit is contained in:
parent
50a795dc97
commit
e2cb06f0f2
117 changed files with 4414 additions and 168 deletions
|
|
@ -15,6 +15,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [
|
||||
|
|
@ -142,6 +144,16 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
|
|||
}
|
||||
args.jobLog("Input path: ".concat(args.inputFileObj._id));
|
||||
args.jobLog("Output path: ".concat(outputPath));
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping copy.');
|
||||
return [2 /*return*/, {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
}];
|
||||
}
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
return [4 /*yield*/, fs_1.promises.copyFile(args.inputFileObj._id, ouputFilePath)];
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
@ -85,6 +87,16 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
|
|||
});
|
||||
args.jobLog("Input path: ".concat(args.inputFileObj._id));
|
||||
args.jobLog("Output path: ".concat(outputPath));
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping copy.');
|
||||
return [2 /*return*/, {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
}];
|
||||
}
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
return [4 /*yield*/, fs_1.promises.copyFile(args.inputFileObj._id, ouputFilePath)];
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: '',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [
|
||||
|
|
@ -124,6 +126,16 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
|
|||
});
|
||||
args.jobLog("Input path: ".concat(args.inputFileObj._id));
|
||||
args.jobLog("Output path: ".concat(ouputFilePath));
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping move.');
|
||||
return [2 /*return*/, {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
}];
|
||||
}
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
return [4 /*yield*/, (0, fileUtils_1.moveFileAndValidate)({
|
||||
inputPath: args.inputFileObj._id,
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
@ -71,6 +73,16 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
|
|||
container = (0, fileUtils_1.getContainer)(args.inputFileObj._id);
|
||||
outputDir = (0, fileUtils_1.getFileAbosluteDir)(args.originalLibraryFile._id);
|
||||
ouputFilePath = "".concat(outputDir, "/").concat(fileName, ".").concat(container);
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping move.');
|
||||
return [2 /*return*/, {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
}];
|
||||
}
|
||||
return [4 /*yield*/, (0, fileUtils_1.moveFileAndValidate)({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: ouputFilePath,
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: '',
|
||||
inputs: [
|
||||
|
|
@ -85,6 +87,16 @@ var plugin = function (args) { return __awaiter(void 0, void 0, void 0, function
|
|||
newName = newName.replace(/\${container}/g, (0, fileUtils_1.getContainer)(args.inputFileObj._id));
|
||||
fileDir = (0, fileUtils_1.getFileAbosluteDir)(args.inputFileObj._id);
|
||||
newPath = "".concat(fileDir, "/").concat(newName);
|
||||
if (args.inputFileObj._id === newPath) {
|
||||
args.jobLog('Input and output path are the same, skipping rename.');
|
||||
return [2 /*return*/, {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
}];
|
||||
}
|
||||
return [4 /*yield*/, (0, fileUtils_1.moveFileAndValidate)({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: newPath,
|
||||
|
|
|
|||
|
|
@ -41,12 +41,14 @@ var fileUtils_1 = require("../../../../FlowHelpers/1.0.0/fileUtils");
|
|||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||
var details = function () { return ({
|
||||
name: 'Replace Original File',
|
||||
description: 'Replace the original file',
|
||||
description: 'Replace the original file. If the file hasn\'t changed then no action is taken.',
|
||||
style: {
|
||||
borderColor: 'green',
|
||||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: '',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ var details = function () { return ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue