Fix crash after download

This commit is contained in:
Izuco 2022-03-05 19:00:33 +01:00
parent acd427a251
commit 9ef4d43674
No known key found for this signature in database
GPG key ID: E9CBE9E4EF3A1BFA
2 changed files with 3 additions and 1 deletions

View file

@ -1293,7 +1293,7 @@ export default class Crunchy implements ServiceClass {
await this.refreshToken();
const parsed = await this.parseSeriesById(id);
if (!parsed)
throw new Error('Unable to parse');
return { data: {}, list: [] };
const result = this.parseSeriesResult(parsed);
const episodes : Record<string, {
items: Item[],

View file

@ -8,6 +8,8 @@ const workingDir = (process as NodeJS.Process & {
pkg?: unknown
}).pkg ? path.dirname(process.execPath) : process.env.contentDirectory ? process.env.contentDirectory : path.join(__dirname, '/..');
export { workingDir };
const binCfgFile = path.join(workingDir, 'config', 'bin-path');
const dirCfgFile = path.join(workingDir, 'config', 'dir-path');
const cliCfgFile = path.join(workingDir, 'config', 'cli-defaults');