MNS: Show message on error (#3516)

* message

* check on all pages
This commit is contained in:
bapeey 2024-06-12 05:37:42 -05:00 committed by GitHub
parent e6431a6fac
commit a94413af93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.MangasNoSekai'
themePkg = 'madara'
baseUrl = 'https://mangasnosekai.com'
overrideVersionCode = 14
overrideVersionCode = 15
}
apply from: "$rootDir/common.gradle"

View File

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