From c7a10398f22f4d1a5dbad1fd08a64032cc114492 Mon Sep 17 00:00:00 2001 From: Seyden Date: Sun, 28 Jul 2024 20:26:38 +0200 Subject: [PATCH] AsuraScans | Fix mistake from previous commit --- src/AsuraScans/AsuraScans.ts | 2 +- src/AsuraScans/AsuraScansParser.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AsuraScans/AsuraScans.ts b/src/AsuraScans/AsuraScans.ts index 94456a9..5610a72 100644 --- a/src/AsuraScans/AsuraScans.ts +++ b/src/AsuraScans/AsuraScans.ts @@ -48,7 +48,7 @@ const ASURASCANS_DOMAIN = 'https://asuracomic.net' const ASURASCANS_API_DOMAIN = 'https://gg.asuracomic.net' export const AsuraScansInfo: SourceInfo = { - version: '4.1.4', + version: '4.1.5', name: 'AsuraScans', description: 'Extension that pulls manga from AsuraScans', author: 'Seyden', diff --git a/src/AsuraScans/AsuraScansParser.ts b/src/AsuraScans/AsuraScansParser.ts index a2f5747..d889a78 100644 --- a/src/AsuraScans/AsuraScansParser.ts +++ b/src/AsuraScans/AsuraScansParser.ts @@ -95,13 +95,14 @@ export class AsuraScansParser { if (obj == '') { throw new Error(`Failed to parse comic object for manga ${mangaId}`) // If null, throw error, else parse data to json. } - + + const comicObj = JSON.parse(obj) + obj = extractMangaData(tempData, "chapters") ?? '' if (obj == '') { throw new Error(`Failed to parse chapters object for manga ${mangaId}`) // If null, throw error, else parse data to json. } - const comicObj = JSON.parse(obj) const chaptersObj = JSON.parse(obj) const slug = comicObj.comic.slug?.trim()