mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
rename var
This commit is contained in:
parent
406d141058
commit
ef180da39f
@ -7,7 +7,7 @@ Using a JSON config with mStream allows for more advanced configurations. This
|
||||
"port": 3030,
|
||||
"webAppDirectory": "public",
|
||||
"secret": "b6j7j5e6u5g36ubn536uyn536unm5m67u5365vby435y54ymn",
|
||||
"logging": true,
|
||||
"writeLogs": true,
|
||||
"scanOptions": {
|
||||
"skipImg": true,
|
||||
"scanInterval": 1.5,
|
||||
|
||||
@ -552,8 +552,8 @@ async function serverLoop(loadJson) {
|
||||
{ name: ' * Port', value: 'editPort' },
|
||||
{ name: ' * SSL', value: 'ssl' },
|
||||
{ name: ' * Storage', value: 'storage' },
|
||||
{ name: ` * Logging (${loadJson.logging ? colors.green('Enabled') : colors.red('Disabled')})`, value: 'logs' },
|
||||
{ name: ` * File Uploading (${loadJson.noUpload ? colors.red('Disabled') : colors.green('Enabled')})`, value: 'upload' },
|
||||
{ name: ` * Write Logs to Disk (${loadJson.writeLogs ? colors.green('Enabled') : colors.red('Disabled')})`, value: 'logs' },
|
||||
// { name: ' * Logs', value: 'logs' }, // TODO:
|
||||
// { name: ' * Save Directory', value: 'save' }, // TODO:
|
||||
{ name: ' * Generate New Authentication Secret', value: 'editSecret' },
|
||||
@ -760,7 +760,7 @@ function editLogsDirectory(loadJson) {
|
||||
console.log(colors.magenta('Logs Storage'));
|
||||
console.log();
|
||||
console.log('mStream will write all logs to this directory');
|
||||
console.log(`Logging is currently: ${loadJson.logging ? colors.green('Enabled') : colors.red('Disabled')}`)
|
||||
console.log(`Writing logs to disk is currently: ${loadJson.writeLogs ? colors.green('Enabled') : colors.red('Disabled')}`)
|
||||
console.log();
|
||||
console.log();
|
||||
|
||||
@ -785,13 +785,13 @@ async function toggleLogging(loadJson) {
|
||||
console.log(colors.blue.bold('mStream Configuration Wizard'));
|
||||
console.log(colors.magenta('Logging'));
|
||||
console.log();
|
||||
console.log(`Logging is: ${loadJson.logging ? colors.green('Enabled') : colors.red('Disabled') }`);
|
||||
console.log(`Logging is: ${loadJson.writeLogs ? colors.green('Enabled') : colors.red('Disabled') }`);
|
||||
console.log(`Logs will be written to: ${loadJson.storage.logsDirectory ? loadJson.storage.logsDirectory : defaults.storage.logsDirectory}`);
|
||||
console.log();
|
||||
|
||||
const shouldFlip = await confirmThis(`Do you want to ${loadJson.logging ? colors.red('DISABLE') : colors.green('ENABLE') } logging?`);
|
||||
const shouldFlip = await confirmThis(`Do you want to ${loadJson.writeLogs ? colors.red('DISABLE') : colors.green('ENABLE') } logging?`);
|
||||
if (shouldFlip) {
|
||||
loadJson.logging = !loadJson.logging;
|
||||
loadJson.writeLogs = !loadJson.writeLogs;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1076,7 +1076,7 @@ async function fileScanLoop(loadJson) {
|
||||
new inquirer.Separator(),
|
||||
{ name: ' * Pause Between Files', value: 'dbpause' },
|
||||
{ name: ' * Scan Interval', value: 'interval' },
|
||||
{ name: ' * Boot Scan Pause', value: 'bootpause' },
|
||||
{ name: ' * Boot Scan Delay', value: 'bootpause' },
|
||||
{ name: ' * Skip Image Scan', value: 'skipimg' },
|
||||
{ name: ' * Save Interval', value: 'saveinterval' }
|
||||
]
|
||||
@ -1111,6 +1111,11 @@ function skipImg() {
|
||||
}
|
||||
|
||||
function setSaveInterval() {
|
||||
console.clear();
|
||||
console.log();
|
||||
console.log(colors.blue.bold('mStream Configuration Wizard'));
|
||||
console.log(colors.magenta('DB Save Interval'));
|
||||
console.log();
|
||||
console.log(colors.yellow('Sets how often a DB update should happen during a file scan'));
|
||||
console.log('Large libraries (4TB+) can see some performance gains during scan by increasing this');
|
||||
console.log();
|
||||
|
||||
@ -40,7 +40,7 @@ exports.setup = function (args) {
|
||||
.option('-P, --dbpause <dbpause>', 'Specify File Scan Pause Interval (in Milliseconds)', /^\d+$/i, 0)
|
||||
|
||||
// Logs
|
||||
.option('-L, --logs <path>', 'Specify Database Filepath')
|
||||
.option('-L, --logs', 'Enable Write Logs To Disk')
|
||||
|
||||
// JSON config
|
||||
.option('-j, --json <json>', 'Specify JSON Boot File')
|
||||
@ -177,7 +177,7 @@ exports.setup = function (args) {
|
||||
|
||||
// Logs
|
||||
if (program.logs) {
|
||||
program3.logs = { path: program.logs };
|
||||
program3.writeLogs = true;
|
||||
}
|
||||
|
||||
return program3;
|
||||
|
||||
@ -25,7 +25,7 @@ exports.serveit = function (program) {
|
||||
defaults.setup(program);
|
||||
|
||||
// Logging
|
||||
if (program.logging) {
|
||||
if (program.writeLogs) {
|
||||
logger.addFileLogger(program.storage.logsDirectory);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user