mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-09 15:38:19 -07:00
Update Tdarr_Plugin_z18s_rename_files_based_on_codec.js
This commit is contained in:
parent
1a1ae80f00
commit
8ac2e2f165
1 changed files with 9 additions and 1 deletions
|
|
@ -22,7 +22,15 @@ module.exports.plugin = function plugin(file, librarySettings, inputs) {
|
|||
|
||||
try {
|
||||
|
||||
var fsextra = require('fs-extra')
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
if (fs.existsSync(path.join(process.cwd() , '/npm'))) {
|
||||
var rootModules = path.join(process.cwd() , '/npm/node_modules/')
|
||||
} else{
|
||||
var rootModules = ''
|
||||
}
|
||||
|
||||
var fsextra = require(rootModules+'fs-extra')
|
||||
|
||||
var fileNameOld = file._id
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue