diff --git a/src/ru/remanga/build.gradle b/src/ru/remanga/build.gradle index f38de49c2..463eb3b40 100644 --- a/src/ru/remanga/build.gradle +++ b/src/ru/remanga/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'Remanga' pkgNameSuffix = 'ru.remanga' extClass = '.Remanga' - extVersionCode = 79 + extVersionCode = 80 } dependencies { diff --git a/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt b/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt index 5daf945bf..42aa4eb77 100644 --- a/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt +++ b/src/ru/remanga/src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt @@ -404,7 +404,7 @@ class Remanga : ConfigurableSource, HttpSource() { .asObservable().doOnNext { response -> if (!response.isSuccessful) { response.close() - if (response.code == 404 && USER_ID == "") warnLogin = true else throw Exception("HTTP error ${response.code}") + if (USER_ID == "") warnLogin = true else throw Exception("HTTP error ${response.code}") } } .map { response -> @@ -425,7 +425,14 @@ class Remanga : ConfigurableSource, HttpSource() { } private fun mangaBranches(manga: SManga): List { - val responseString = client.newCall(GET(baseUrl + manga.url, headers)).execute().body.string() + val requestString = client.newCall(GET(baseUrl + manga.url, headers)).execute() + if (!requestString.isSuccessful) { + if (USER_ID == "") { + throw Exception("HTTP error ${requestString.code}. Для просмотра контента необходима авторизация через WebView\uD83C\uDF0E") + } + throw Exception("HTTP error ${requestString.code}") + } + val responseString = requestString.body.string() // manga requiring login return "content" as a JsonArray instead of the JsonObject we expect // callback request for update outside the library val content = json.decodeFromString(responseString)["content"]