make-only-subtitle-default
HaveAGitGat 5 years ago committed by GitHub
parent d4b45af139
commit 1f1c2fbbc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,17 +1,15 @@
var fs = require('fs');
var path = require('path');
var fs = require('fs'); if (fs.existsSync(path.join(process.cwd(), '/npm'))) {
var path = require('path'); var rootModules = path.join(process.cwd(), '/npm/node_modules/')
if (fs.existsSync(path.join(process.cwd() , '/npm'))) { } else {
var rootModules = path.join(process.cwd() , '/npm/node_modules/')
} else{
var rootModules = '' var rootModules = ''
} }
const importFresh = require(rootModules+'import-fresh'); const importFresh = require(rootModules + 'import-fresh');
const library = importFresh('../methods/library.js') const library = importFresh('../methods/library.js')
module.exports.details = function details() { module.exports.details = function details() {
return { return {
id: "Tdarr_Plugin_O8O0dCTlb_Set_File_Permissions_For_UnRaid", id: "Tdarr_Plugin_O8O0dCTlb_Set_File_Permissions_For_UnRaid",
Name: "Set file permissions for UnRaid", Name: "Set file permissions for UnRaid",
@ -22,25 +20,25 @@
Link: "", Link: "",
Tags: "post-processing" Tags: "post-processing"
} }
} }
module.exports.plugin = function plugin(file) { module.exports.plugin = function plugin(file) {
//Must return this object at some point //Must return this object at some point
var response = { var response = {
processFile : false, processFile: false,
preset : '', preset: '',
container : '.mkv', container: '.mkv',
handBrakeMode : false, handBrakeMode: false,
FFmpegMode : true, FFmpegMode: true,
reQueueAfter : true, reQueueAfter: true,
infoLog : '', infoLog: '',
} }
response.infoLog += "" response.infoLog += ""
if((true) || file.forceProcessing === true){ if ((true) || file.forceProcessing === true) {
require("child_process").execSync(`chown nobody:users "${file._id}"`) require("child_process").execSync(`chown nobody:users "${file._id}"`)
response.preset = '' response.preset = ''
@ -52,6 +50,4 @@
response.infoLog += "File permissions set \n" response.infoLog += "File permissions set \n"
return response return response
} }
} }

Loading…
Cancel
Save