From 2b201b0785803006419cd79450019dc9a33324be Mon Sep 17 00:00:00 2001 From: Godzil Date: Mon, 27 Aug 2018 13:16:22 +0100 Subject: [PATCH] Fix #94 --- src/batch.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/batch.ts b/src/batch.ts index 4e31734..b26607d 100644 --- a/src/batch.ts +++ b/src/batch.ts @@ -33,6 +33,11 @@ export default function(args: string[], done: (err?: Error) => void) batchPath = path.normalize(path.join(process.cwd(), config.batch)); } + if (config.nametmpl === undefined) + { + config.nametmpl = '{SERIES_TITLE} - s{SEASON_NUMBER}e{EPISODE_NUMBER} - {EPISODE_TITLE} - [{TAG}]'; + } + // Update the config file with new parameters cfg.save(config); @@ -354,7 +359,7 @@ function parse(args: string[]): IConfigLine .option('-o, --output ', 'The output path.') .option('-s, --series ', 'The series name override.') .option('--ignoredub', 'Experimental: Ignore all seasons where the title end with \'Dub)\'') - .option('-n, --nametmpl ', 'Output name template', '{SERIES_TITLE} - s{SEASON_NUMBER}e{EPISODE_NUMBER} - {EPISODE_TITLE} - [{TAG}]') + .option('-n, --nametmpl ', 'Output name template') .option('-t, --tag ', 'The subgroup.', 'CrunchyRoll') .option('-r, --resolution ', 'The video resolution. (valid: 360, 480, 720, 1080)', '1080') .option('-b, --batch ', 'Batch file', 'CrunchyRoll.txt')