From a94413af93c1c4868a9f81da13848dee45470e56 Mon Sep 17 00:00:00 2001 From: bapeey <90949336+bapeey@users.noreply.github.com> Date: Wed, 12 Jun 2024 05:37:42 -0500 Subject: [PATCH] MNS: Show message on error (#3516) * message * check on all pages --- src/es/mangasnosekai/build.gradle | 2 +- .../tachiyomi/extension/es/mangasnosekai/MangasNoSekai.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/es/mangasnosekai/build.gradle b/src/es/mangasnosekai/build.gradle index 10e6dbf59..b606610a5 100644 --- a/src/es/mangasnosekai/build.gradle +++ b/src/es/mangasnosekai/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.MangasNoSekai' themePkg = 'madara' baseUrl = 'https://mangasnosekai.com' - overrideVersionCode = 14 + overrideVersionCode = 15 } apply from: "$rootDir/common.gradle" diff --git a/src/es/mangasnosekai/src/eu/kanade/tachiyomi/extension/es/mangasnosekai/MangasNoSekai.kt b/src/es/mangasnosekai/src/eu/kanade/tachiyomi/extension/es/mangasnosekai/MangasNoSekai.kt index 348c1bd69..3582004bf 100644 --- a/src/es/mangasnosekai/src/eu/kanade/tachiyomi/extension/es/mangasnosekai/MangasNoSekai.kt +++ b/src/es/mangasnosekai/src/eu/kanade/tachiyomi/extension/es/mangasnosekai/MangasNoSekai.kt @@ -231,6 +231,9 @@ class MangasNoSekai : Madara( do { val xhrRequest = altChapterRequest(url, mangaId, page, objects) val xhrResponse = client.newCall(xhrRequest).execute() + if (!xhrResponse.isSuccessful) { + throw Exception("HTTP ${xhrResponse.code}: Intente iniciar sesiĆ³n en WebView") + } val xhrBody = xhrResponse.body.string() if (xhrBody.startsWith("{")) { return chaptersFromJson(xhrBody, mangaSlug)