mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-15 10:15:54 -07:00
Update README.md
This commit is contained in:
parent
60b998549d
commit
9dd59e7392
1 changed files with 17 additions and 2 deletions
19
README.md
19
README.md
|
|
@ -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.
|
||||||
|
|
||||||
Example file object:
|
Note, to access FFprobe inside a plugin, use this:
|
||||||
var file = {
|
|
||||||
|
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',
|
_id: 'C:/Users/H/Desktop/Test Input1/Sample.mp4',
|
||||||
DB: 'ZRPDmnmpyuAEQi7nG',
|
DB: 'ZRPDmnmpyuAEQi7nG',
|
||||||
HealthCheck: 'Not attempted',
|
HealthCheck: 'Not attempted',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue