mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-10 16:00:28 -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 @@ const details = (): IpluginDetails => ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ const details = (): IpluginDetails => ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ const details = (): IpluginDetails => ({
|
|||
tags: '',
|
||||
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ const details = (): IpluginDetails => ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ const details = (): IpluginDetails => ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ const details = (): IpluginDetails => ({
|
|||
tags: '',
|
||||
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faQuestion',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ const details = (): IpluginDetails => ({
|
|||
tags: '',
|
||||
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [
|
||||
|
|
@ -115,6 +117,18 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
args.jobLog(`Input path: ${args.inputFileObj._id}`);
|
||||
args.jobLog(`Output path: ${outputPath}`);
|
||||
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping copy.');
|
||||
|
||||
return {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
}
|
||||
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
|
||||
await fs.copyFile(args.inputFileObj._id, ouputFilePath);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ const details = (): IpluginDetails => ({
|
|||
tags: '',
|
||||
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
@ -51,6 +53,18 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
args.jobLog(`Input path: ${args.inputFileObj._id}`);
|
||||
args.jobLog(`Output path: ${outputPath}`);
|
||||
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping copy.');
|
||||
|
||||
return {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
}
|
||||
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
|
||||
await fs.copyFile(args.inputFileObj._id, ouputFilePath);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ const details = ():IpluginDetails => ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: '',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ const details = ():IpluginDetails => ({
|
|||
tags: '',
|
||||
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [
|
||||
|
|
@ -97,6 +99,18 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
args.jobLog(`Input path: ${args.inputFileObj._id}`);
|
||||
args.jobLog(`Output path: ${ouputFilePath}`);
|
||||
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping move.');
|
||||
|
||||
return {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
}
|
||||
|
||||
args.deps.fsextra.ensureDirSync(outputPath);
|
||||
|
||||
await moveFileAndValidate({
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ const details = ():IpluginDetails => ({
|
|||
tags: '',
|
||||
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
@ -40,6 +42,18 @@ const plugin = async (args:IpluginInputArgs):Promise<IpluginOutputArgs> => {
|
|||
|
||||
const ouputFilePath = `${outputDir}/${fileName}.${container}`;
|
||||
|
||||
if (args.inputFileObj._id === ouputFilePath) {
|
||||
args.jobLog('Input and output path are the same, skipping move.');
|
||||
|
||||
return {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
}
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: ouputFilePath,
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ const details = (): IpluginDetails => ({
|
|||
},
|
||||
tags: 'video',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: '',
|
||||
inputs: [
|
||||
|
|
@ -54,6 +56,18 @@ const plugin = async (args: IpluginInputArgs): Promise<IpluginOutputArgs> => {
|
|||
const fileDir = getFileAbosluteDir(args.inputFileObj._id);
|
||||
const newPath = `${fileDir}/${newName}`;
|
||||
|
||||
if (args.inputFileObj._id === newPath) {
|
||||
args.jobLog('Input and output path are the same, skipping rename.');
|
||||
|
||||
return {
|
||||
outputFileObj: {
|
||||
_id: args.inputFileObj._id,
|
||||
},
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
}
|
||||
|
||||
await moveFileAndValidate({
|
||||
inputPath: args.inputFileObj._id,
|
||||
outputPath: newPath,
|
||||
|
|
|
|||
|
|
@ -10,12 +10,14 @@ import {
|
|||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||
const details = (): IpluginDetails => ({
|
||||
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: [],
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ const details = ():IpluginDetails => ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: '',
|
||||
inputs: [],
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ const details = ():IpluginDetails => ({
|
|||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.11.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faArrowRight',
|
||||
inputs: [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue