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 {