From e32d2fdefe34cbc8fa2fec7b7874de4d461c6ec2 Mon Sep 17 00:00:00 2001 From: AnimeDL Date: Mon, 10 Jul 2023 15:58:45 -0700 Subject: [PATCH] Fix debug command --- crunchy.ts | 2 +- hidive.ts | 2 +- index.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crunchy.ts b/crunchy.ts index 686ba83..f40fb3d 100644 --- a/crunchy.ts +++ b/crunchy.ts @@ -53,7 +53,7 @@ export default class Crunchy implements ServiceClass { constructor(private debug = false) { this.cfg = yamlCfg.loadCfg(); this.token = yamlCfg.loadCRToken(); - this.req = new reqModule.Req(domain, false, false, 'cr'); + this.req = new reqModule.Req(domain, debug, false, 'cr'); } public checkToken(): boolean { diff --git a/hidive.ts b/hidive.ts index e7478b2..d68a504 100644 --- a/hidive.ts +++ b/hidive.ts @@ -59,7 +59,7 @@ export default class Hidive implements ServiceClass { this.session = yamlCfg.loadHDSession(); this.token = yamlCfg.loadHDToken(); this.client = yamlCfg.loadHDProfile() as {ipAddress: string, xNonce: string, xSignature: string, visitId: string, profile: {userId: number, profileId: number, deviceId : string}}; - this.req = new reqModule.Req(domain, false, false, 'hd'); + this.req = new reqModule.Req(domain, debug, false, 'hd'); } public async doInit() { diff --git a/index.ts b/index.ts index 1b952fc..e65830f 100644 --- a/index.ts +++ b/index.ts @@ -55,11 +55,11 @@ import update from './modules/module.updater'; if (key.endsWith('crunchy.js') || key.endsWith('funi.js') || key.endsWith('hidive.js')) delete require.cache[key]; }); - const service = new (argv.service === 'funi' ? (await import('./funi')).default : argv.service === 'hidive' ? (await import('./hidive')).default : (await import('./crunchy')).default)() as ServiceClass; + const service = new (argv.service === 'funi' ? (await import('./funi')).default : argv.service === 'hidive' ? (await import('./hidive')).default : (await import('./crunchy')).default)(argv.debug) as ServiceClass; await service.cli(); } } else { - const service = new (argv.service === 'funi' ? (await import('./funi')).default : argv.service === 'hidive' ? (await import('./hidive')).default : (await import('./crunchy')).default)() as ServiceClass; + const service = new (argv.service === 'funi' ? (await import('./funi')).default : argv.service === 'hidive' ? (await import('./hidive')).default : (await import('./crunchy')).default)(argv.debug) as ServiceClass; await service.cli(); } })(); \ No newline at end of file