mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-21 08:21:56 +00:00
fixed eslint errors, removed cli and bin defaults
This commit is contained in:
parent
370cff37e3
commit
a69f83fea1
1 changed files with 10 additions and 18 deletions
28
funi.js
28
funi.js
|
|
@ -37,31 +37,23 @@ let cfg = {
|
|||
cli: getYamlCfg(cliCfgFile),
|
||||
};
|
||||
|
||||
// make sure cfg params aren't empty
|
||||
// If they are, update them with some defaults
|
||||
// make sure cfg params aren't null
|
||||
if (cfg.bin === null){
|
||||
cfg.bin = {};
|
||||
console.log('[WARN] bin-path.yml is empty or does not exist!\n');
|
||||
cfg.bin = {};
|
||||
console.log('[WARN] bin-path.yml is empty or does not exist!\n');
|
||||
}
|
||||
if (!cfg.bin.hasOwnProperty('ffmpeg')) cfg.bin.ffmpeg = './bin/ffmpeg';
|
||||
if (!cfg.bin.hasOwnProperty('mkvmerge')) cfg.bin.mkvmerge = './bin/mkvmerge';
|
||||
|
||||
if (cfg.dir === null){
|
||||
cfg.dir = {};
|
||||
console.log('[WARN] dir-path.yml is empty or does not exist!\n');
|
||||
cfg.dir = {};
|
||||
console.log('[WARN] dir-path.yml is empty or does not exist!\n');
|
||||
}
|
||||
if (!cfg.dir.hasOwnProperty('content')) cfg.dir.content = './videos/';
|
||||
|
||||
if (!Object.prototype.hasOwnProperty.call(cfg.dir, 'content')) cfg.dir.content = './videos/';
|
||||
|
||||
if (cfg.cli === null){
|
||||
cfg.cli = {};
|
||||
console.log('[WARN] cli-defaults.yml is empty or does not exist!\n');
|
||||
cfg.cli = {};
|
||||
console.log('[WARN] cli-defaults.yml is empty or does not exist!\n');
|
||||
}
|
||||
if (!cfg.cli.hasOwnProperty('releaseGroup')) cfg.cli.releaseGroup = "Funimation";
|
||||
if (!cfg.cli.hasOwnProperty('videoLayer')) cfg.cli.videoLayer = 7;
|
||||
if (!cfg.cli.hasOwnProperty('nServer')) cfg.cli.nServer = 1;
|
||||
if (!cfg.cli.hasOwnProperty('mp4mux')) cfg.cli.mp4mux = false;
|
||||
if (!cfg.cli.hasOwnProperty('muxSubs')) cfg.cli.muxSubs = false;
|
||||
if (!cfg.cli.hasOwnProperty('noCleanUp')) cfg.cli.noCleanUp = false;
|
||||
|
||||
/* Normalise paths for use outside the current directory */
|
||||
for (let key of Object.keys(cfg.dir)) {
|
||||
|
|
@ -950,4 +942,4 @@ function parseFileName(input, title, episode, showTitle, season, width, height)
|
|||
}
|
||||
}
|
||||
return shlp.cleanupFilename(input);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue