diff --git a/README.md b/README.md index 947a9ea..5204862 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,23 @@ https://github.com/HaveAGitGat/Tdarr_Plugins/tree/master/Community For local plugins: Add them to 'User\Documents\Tdarr\Plugins\Local'. In Tdarr, select 'Local' in the plugin section of the library you're in and add your local plugin id. - Example file object: - var file = { +Note, to access FFprobe inside a plugin, use this: + + const fs = require("fs"); + const path = require("path"); + let rootModules; + if (fs.existsSync(path.join(process.cwd(), "/npm"))) { + rootModules = path.join(process.cwd(), "/npm/node_modules/"); + } else { + rootModules = ""; + } + + const ffprobePath = require(rootModules + 'ffprobe-static').path; + //do something with ffprobe + +Example file object: + + let file = { _id: 'C:/Users/H/Desktop/Test Input1/Sample.mp4', DB: 'ZRPDmnmpyuAEQi7nG', HealthCheck: 'Not attempted',