Fix debug command

This commit is contained in:
AnimeDL 2023-07-10 15:58:45 -07:00
parent 3c840e46f0
commit e32d2fdefe
3 changed files with 4 additions and 4 deletions

View file

@ -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 {

View file

@ -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() {

View file

@ -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();
}
})();