disable scanForOrphanedVideos on child node completely
parent
1fc0c1d03e
commit
9d1f7e0991
|
|
@ -1,6 +1,13 @@
|
|||
const fs = require('fs')
|
||||
const { spawn } = require('child_process')
|
||||
module.exports = (s,config,lang) => {
|
||||
const isMasterNode = (
|
||||
(
|
||||
config.childNodes.enabled === true &&
|
||||
config.childNodes.mode === 'master'
|
||||
) ||
|
||||
config.childNodes.enabled === false
|
||||
);
|
||||
// orphanedVideoCheck : new function
|
||||
const checkIfVideoIsOrphaned = (monitor,videosDirectory,filename) => {
|
||||
const response = {ok: true}
|
||||
|
|
@ -40,7 +47,7 @@ module.exports = (s,config,lang) => {
|
|||
})
|
||||
})
|
||||
}
|
||||
const scanForOrphanedVideos = (monitor,options) => {
|
||||
let scanForOrphanedVideos = (monitor,options) => {
|
||||
// const options = {
|
||||
// checkMax: 2
|
||||
// }
|
||||
|
|
@ -115,6 +122,11 @@ module.exports = (s,config,lang) => {
|
|||
}
|
||||
})
|
||||
}
|
||||
if(!isMasterNode){
|
||||
scanForOrphanedVideos = async () => {
|
||||
return {ok: true, orphanedFilesCount: 0}
|
||||
}
|
||||
}
|
||||
// orphanedVideoCheck : old function
|
||||
const orphanedVideoCheck = (monitor,checkMax,callback,forceCheck) => {
|
||||
var finish = function(orphanedFilesCount){
|
||||
|
|
|
|||
Loading…
Reference in New Issue