We want to save the video format/quality infos in the config file.
This commit is contained in:
parent
b3a96cd0e7
commit
e058b8e699
36
src/batch.ts
36
src/batch.ts
@ -38,19 +38,14 @@ export default function(args: string[], done: (err?: Error) => void)
|
||||
config.nametmpl = '{SERIES_TITLE} - s{SEASON_NUMBER}e{EPISODE_NUMBER} - {EPISODE_TITLE} - [{TAG}]';
|
||||
}
|
||||
|
||||
// Update the config file with new parameters
|
||||
cfg.save(config);
|
||||
|
||||
if (config.unlog)
|
||||
if (config.tag === undefined)
|
||||
{
|
||||
config.crDeviceId = undefined;
|
||||
config.user = undefined;
|
||||
config.pass = undefined;
|
||||
my_request.eatCookies(config);
|
||||
cfg.save(config);
|
||||
log.info('Unlogged!');
|
||||
config.tag = 'CrunchyRoll';
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
if (config.sublang === undefined)
|
||||
{
|
||||
config.sublang = [ 'enUS' ];
|
||||
}
|
||||
|
||||
// set resolution
|
||||
@ -75,6 +70,21 @@ export default function(args: string[], done: (err?: Error) => void)
|
||||
config.video_quality = resol_table['1080'].quality;
|
||||
}
|
||||
|
||||
// Update the config file with new parameters
|
||||
cfg.save(config);
|
||||
|
||||
if (config.unlog)
|
||||
{
|
||||
config.crDeviceId = undefined;
|
||||
config.user = undefined;
|
||||
config.pass = undefined;
|
||||
my_request.eatCookies(config);
|
||||
cfg.save(config);
|
||||
log.info('Unlogged!');
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if (config.debug)
|
||||
{
|
||||
/* Ugly but meh */
|
||||
@ -388,8 +398,8 @@ function parse(args: string[]): IConfigLine
|
||||
.option('-s, --series <s>', 'The series name override.')
|
||||
.option('--ignoredub', 'Experimental: Ignore all seasons where the title end with \'Dub)\'')
|
||||
.option('-n, --nametmpl <s>', 'Output name template')
|
||||
.option('-t, --tag <s>', 'The subgroup.', 'CrunchyRoll')
|
||||
.option('-r, --resolution <s>', 'The video resolution. (valid: 360, 480, 720, 1080)', '1080')
|
||||
.option('-t, --tag <s>', 'The subgroup.')
|
||||
.option('-r, --resolution <s>', 'The video resolution. (valid: 360, 480, 720, 1080)')
|
||||
.option('-b, --batch <s>', 'Batch file', 'CrunchyRoll.txt')
|
||||
.option('--verbose', 'Make tool verbose')
|
||||
.option('--debug', 'Create a debug file. Use only if requested!')
|
||||
|
||||
@ -71,8 +71,6 @@ export function save(config: IConfig)
|
||||
tmp.cache = undefined;
|
||||
tmp.episodes = undefined;
|
||||
tmp.series = undefined;
|
||||
tmp.video_format = undefined;
|
||||
tmp.video_quality = undefined;
|
||||
tmp.rebuildcrp = undefined;
|
||||
tmp.batch = undefined;
|
||||
tmp.verbose = undefined;
|
||||
|
||||
1
src/interface/IConfig.d.ts
vendored
1
src/interface/IConfig.d.ts
vendored
@ -8,6 +8,7 @@ interface IConfig {
|
||||
episodes?: string;
|
||||
// Settings
|
||||
crlang?: string;
|
||||
sublang?: any;
|
||||
format?: string;
|
||||
output?: string;
|
||||
series?: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user