diff --git a/app/build.gradle b/app/build.gradle index c4a9d06172..88cf62f642 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -218,7 +218,7 @@ dependencies { } buildscript { - ext.kotlin_version = '1.1.2-3' + ext.kotlin_version = '1.1.3' repositories { mavenCentral() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Batoto.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Batoto.kt index 3fc821d7de..08cdc3bd75 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Batoto.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/english/Batoto.kt @@ -161,6 +161,18 @@ class Batoto : ParsedHttpSource(), LoginSource { else -> SManga.UNKNOWN } + override fun chapterListRequest(manga: SManga): Request { + // Https is currently very slow. The replace also saves a redirection. + var newUrl = "http://bato.to" + manga.url + if ("/comic/_/comics/" !in newUrl) { + newUrl = newUrl.replace("/comic/_/", "/comic/_/comics/") + } + + return super.chapterListRequest(manga).newBuilder() + .url(newUrl) + .build() + } + override fun chapterListParse(response: Response): List { val body = response.body()!!.string() val matcher = staffNotice.matcher(body)