diff --git a/FlowPlugins/CommunityFlowPlugins/tools/removeFromTdarr/1.0.0/index.js b/FlowPlugins/CommunityFlowPlugins/tools/removeFromTdarr/1.0.0/index.js new file mode 100644 index 0000000..169b17f --- /dev/null +++ b/FlowPlugins/CommunityFlowPlugins/tools/removeFromTdarr/1.0.0/index.js @@ -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; diff --git a/FlowPluginsTs/CommunityFlowPlugins/file/deleteFile/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/file/deleteFile/1.0.0/index.ts index 98338a0..c441985 100644 --- a/FlowPluginsTs/CommunityFlowPlugins/file/deleteFile/1.0.0/index.ts +++ b/FlowPluginsTs/CommunityFlowPlugins/file/deleteFile/1.0.0/index.ts @@ -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', }, diff --git a/FlowPluginsTs/CommunityFlowPlugins/tools/removeFromTdarr/1.0.0/index.ts b/FlowPluginsTs/CommunityFlowPlugins/tools/removeFromTdarr/1.0.0/index.ts new file mode 100644 index 0000000..c5c00d6 --- /dev/null +++ b/FlowPluginsTs/CommunityFlowPlugins/tools/removeFromTdarr/1.0.0/index.ts @@ -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, +}; diff --git a/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts b/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts index 490d3e9..80fbb35 100644 --- a/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts +++ b/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts @@ -111,7 +111,8 @@ export interface Ivariables { user: Record, healthCheck?: 'Success', queueTags?: string, - liveSizeCompare?: IliveSizeCompare + liveSizeCompare?: IliveSizeCompare, + removeFromTdarr?: boolean, } export interface IpluginOutputArgs {