Update README.md

This commit is contained in:
HaveAGitGat 2020-08-11 21:13:48 +02:00 committed by GitHub
parent 60b998549d
commit 9dd59e7392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,8 +72,23 @@ https://github.com/HaveAGitGat/Tdarr_Plugins/tree/master/Community
For local plugins: 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. 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.
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: Example file object:
var file = {
let file = {
_id: 'C:/Users/H/Desktop/Test Input1/Sample.mp4', _id: 'C:/Users/H/Desktop/Test Input1/Sample.mp4',
DB: 'ZRPDmnmpyuAEQi7nG', DB: 'ZRPDmnmpyuAEQi7nG',
HealthCheck: 'Not attempted', HealthCheck: 'Not attempted',