From 8f8c1ef90e1a6e0bb4f75052447b358df9e69cb2 Mon Sep 17 00:00:00 2001 From: Pavka Date: Tue, 25 May 2021 15:21:51 +0300 Subject: [PATCH] Update Remanga.kt (#7218) * Update Remanga.kt Fix crash with 500 on remanga * Remanga 26 version --- src/ru/remanga/build.gradle | 2 +- .../src/eu/kanade/tachiyomi/extension/ru/remanga/Remanga.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ru/remanga/build.gradle b/src/ru/remanga/build.gradle index 634e0a040..c0384c456 100644 --- a/src/ru/remanga/build.gradle +++ b/src/ru/remanga/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Remanga' pkgNameSuffix = 'ru.remanga' extClass = '.Remanga' - extVersionCode = 25 + extVersionCode = 26 libVersion = '1.2' } 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 fb82d6701..c5381e703 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 @@ -105,7 +105,7 @@ class Remanga : ConfigurableSource, HttpSource() { jsonObject.put("password", password) val body = jsonObject.toString().toRequestBody(MEDIA_TYPE) val response = chain.proceed(POST("$baseUrl/api/users/login/", headers, body)) - if (response.code == 400) { + if (response.code >= 400) { throw Exception("Failed to login") } val user = gson.fromJson>(response.body?.charStream()!!)