Merge pull request #762 from HaveAGitGat/custom_func2

Update examples
master
HaveAGitGat 10 months ago committed by GitHub
commit 0bdfa5551d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -58,7 +58,7 @@ var details = function () { return ({
label: 'JS Code', label: 'JS Code',
name: 'code', name: 'code',
type: 'string', type: 'string',
defaultValue: "\nmodule.exports = async (args) => {\n\n// see args object data here https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts\n// example setting flow variable: https://github.com/HaveAGitGat/Tdarr/issues/1147#issuecomment-2593348443\n// example reading ffmpeg metadata: https://github.com/HaveAGitGat/Tdarr_Plugins/issues/737#issuecomment-2581536112\n\n// some example file data:\nconsole.log(args.inputFileObj._id)\nconsole.log(args.inputFileObj.file_size)\nconsole.log(args.inputFileObj.ffProbeData.streams[0].codec_name)\nconsole.log(args.inputFileObj.mediaInfo.track[0].BitRate)\n\n// access global variable:\nconsole.log(args.userVariables.global.test)\n// access library variable:\nconsole.log(args.userVariables.library.test)\n\n\n\n// do something here\n\n return {\n outputFileObj: args.inputFileObj,\n outputNumber: 1,\n variables: args.variables,\n };\n}\n ", defaultValue: "\nmodule.exports = async (args) => {\n\n// see args object data here https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts\n// example setting flow variable: https://github.com/HaveAGitGat/Tdarr/issues/1147#issuecomment-2593348443\n// example reading ffmpeg metadata: https://github.com/HaveAGitGat/Tdarr_Plugins/issues/737#issuecomment-2581536112\n// example setting working file as previous working file: https://github.com/HaveAGitGat/Tdarr/issues/1106#issuecomment-2622177459\n\n// some example file data:\nconsole.log(args.inputFileObj._id)\nconsole.log(args.inputFileObj.file_size)\nconsole.log(args.inputFileObj.ffProbeData.streams[0].codec_name)\nconsole.log(args.inputFileObj.mediaInfo.track[0].BitRate)\n\n// access global variable:\nconsole.log(args.userVariables.global.test)\n// access library variable:\nconsole.log(args.userVariables.library.test)\n\n\n\n// do something here\n\n return {\n outputFileObj: args.inputFileObj,\n outputNumber: 1,\n variables: args.variables,\n };\n}\n ",
inputUI: { inputUI: {
type: 'textarea', type: 'textarea',
style: { style: {

@ -32,6 +32,7 @@ module.exports = async (args) => {
// see args object data here https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts // see args object data here https://github.com/HaveAGitGat/Tdarr_Plugins/blob/master/FlowPluginsTs/FlowHelpers/1.0.0/interfaces/interfaces.ts
// example setting flow variable: https://github.com/HaveAGitGat/Tdarr/issues/1147#issuecomment-2593348443 // example setting flow variable: https://github.com/HaveAGitGat/Tdarr/issues/1147#issuecomment-2593348443
// example reading ffmpeg metadata: https://github.com/HaveAGitGat/Tdarr_Plugins/issues/737#issuecomment-2581536112 // example reading ffmpeg metadata: https://github.com/HaveAGitGat/Tdarr_Plugins/issues/737#issuecomment-2581536112
// example setting working file as previous working file: https://github.com/HaveAGitGat/Tdarr/issues/1106#issuecomment-2622177459
// some example file data: // some example file data:
console.log(args.inputFileObj._id) console.log(args.inputFileObj._id)

Loading…
Cancel
Save