mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 07:29:04 -07:00
Merge pull request #766 from HaveAGitGat/remove_from_tdarr
Add Remove From Tdarr
This commit is contained in:
commit
e8d6928078
4 changed files with 90 additions and 2 deletions
|
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.plugin = exports.details = void 0;
|
||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||
var details = function () { return ({
|
||||
name: 'Remove From Tdarr',
|
||||
description: "\n If this plugin is executed, then when the flow ends, the item will be \n removed from the Tdarr database and won't appear in Transcode Success or Error tables on the 'Tdarr' tab.\n Use the 'Delete File' plugin if you would like to delete the file from disk.\n ",
|
||||
style: {
|
||||
borderColor: 'red',
|
||||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.31.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faTrash',
|
||||
inputs: [],
|
||||
outputs: [
|
||||
{
|
||||
number: 1,
|
||||
tooltip: 'Continue to next plugin',
|
||||
},
|
||||
],
|
||||
}); };
|
||||
exports.details = details;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
var plugin = function (args) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
args.variables.removeFromTdarr = true;
|
||||
return {
|
||||
outputFileObj: args.inputFileObj,
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
};
|
||||
exports.plugin = plugin;
|
||||
|
|
@ -10,7 +10,11 @@ import { getFileAbosluteDir } from '../../../../FlowHelpers/1.0.0/fileUtils';
|
|||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||
const details = (): IpluginDetails => ({
|
||||
name: 'Delete File',
|
||||
description: 'Delete the working file or original file.',
|
||||
description: `
|
||||
Delete the working file or original file.
|
||||
You don't need to use this plugin to clean up files in the cache, Tdarr will do this automatically after the flow.
|
||||
To manually clear the cache, use the 'Clear Cache' flow plugin.
|
||||
`,
|
||||
style: {
|
||||
borderColor: 'red',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
import {
|
||||
IpluginDetails,
|
||||
IpluginInputArgs,
|
||||
IpluginOutputArgs,
|
||||
} from '../../../../FlowHelpers/1.0.0/interfaces/interfaces';
|
||||
|
||||
/* eslint no-plusplus: ["error", { "allowForLoopAfterthoughts": true }] */
|
||||
const details = (): IpluginDetails => ({
|
||||
name: 'Remove From Tdarr',
|
||||
description: `
|
||||
If this plugin is executed, then when the flow ends, the item will be
|
||||
removed from the Tdarr database and won't appear in Transcode Success or Error tables on the 'Tdarr' tab.
|
||||
Use the 'Delete File' plugin if you would like to delete the file from disk.
|
||||
`,
|
||||
style: {
|
||||
borderColor: 'red',
|
||||
},
|
||||
tags: '',
|
||||
isStartPlugin: false,
|
||||
pType: '',
|
||||
requiresVersion: '2.31.01',
|
||||
sidebarPosition: -1,
|
||||
icon: 'faTrash',
|
||||
inputs: [],
|
||||
outputs: [
|
||||
{
|
||||
number: 1,
|
||||
tooltip: 'Continue to next plugin',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const plugin = (args: IpluginInputArgs): IpluginOutputArgs => {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
args.variables.removeFromTdarr = true;
|
||||
|
||||
return {
|
||||
outputFileObj: args.inputFileObj,
|
||||
outputNumber: 1,
|
||||
variables: args.variables,
|
||||
};
|
||||
};
|
||||
export {
|
||||
details,
|
||||
plugin,
|
||||
};
|
||||
|
|
@ -111,7 +111,8 @@ export interface Ivariables {
|
|||
user: Record<string, string>,
|
||||
healthCheck?: 'Success',
|
||||
queueTags?: string,
|
||||
liveSizeCompare?: IliveSizeCompare
|
||||
liveSizeCompare?: IliveSizeCompare,
|
||||
removeFromTdarr?: boolean,
|
||||
}
|
||||
|
||||
export interface IpluginOutputArgs {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue