mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-30 06:50:21 +00:00
#505 WIP
This commit is contained in:
parent
0388b411b8
commit
26c5e53bb2
1 changed files with 6 additions and 12 deletions
|
@ -20,27 +20,27 @@ import {csv} from '../../../ExportTools/scripts/csv';
|
|||
const validDir = function( dirName ) {
|
||||
/* Will check if directory is not hidden or should be ignored
|
||||
returns true or false */
|
||||
log.silly(`Checking if ${dirName} is valid`);
|
||||
log.silly(`[FindMedia.js] (validDir) - Checking if ${dirName} is valid`);
|
||||
// Got a hidden one?
|
||||
if ( wtconfig.get('PMS.FindMedia.Settings.IgnoreHidden', true) === 'true' ){
|
||||
if ( dirName.startsWith('.') ){
|
||||
log.silly(`We do not allow hidden dirs like: ${dirName}`);
|
||||
log.silly(`[FindMedia.js] (validDir) - We do not allow hidden dirs like: ${dirName}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Got an Extra dir?
|
||||
if ( findMedia.settingsIgnoreExtras ){
|
||||
if ( findMedia.ExtraDirs.includes( dirName )){
|
||||
log.silly(`We do not allow extra dirs like: ${dirName}`);
|
||||
log.silly(`[FindMedia.js] (validDir) - We do not allow extra dirs like: ${dirName}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Got a dir to ignore?
|
||||
if ( findMedia.settingsIgnoreDirs.includes( dirName ) ){
|
||||
log.silly(`We do not allow ignore dirs like: ${dirName}`);
|
||||
log.silly(`[FindMedia.js] (validDir) - We do not allow ignore dirs like: ${dirName}`);
|
||||
return false;
|
||||
}
|
||||
log.silly(`${dirName} is valid`);
|
||||
log.silly(`[FindMedia.js] (validDir) - ${dirName} is valid`);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -99,12 +99,6 @@ const getAllFiles = function( dirPath, orgDirPath, arrayOfFiles ) {
|
|||
return arrayOfFiles
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const findMedia = new class FINDMEDIA {
|
||||
constructor() {
|
||||
this.validExt = [
|
||||
|
@ -206,7 +200,7 @@ const findMedia = new class FINDMEDIA {
|
|||
this.filesFound = [];
|
||||
await findMedia.scanFileSystemPaths( libpaths );
|
||||
// Scan library
|
||||
await findMedia.scanPMSLibrary(libKey, libType);
|
||||
// await findMedia.scanPMSLibrary(libKey, libType);
|
||||
// Create output file
|
||||
let outFile = await this.makeOutFile( libKey );
|
||||
|
||||
|
|
Loading…
Reference in a new issue