From 3ddd9a52e2c9a97deb56405c3e458a16fc1e240b Mon Sep 17 00:00:00 2001 From: scb261 <65343233+scb261@users.noreply.github.com> Date: Thu, 11 Mar 2021 17:39:28 +0200 Subject: [PATCH] MangaLife, MangaSee: revert temporary page fixes, show error about blocking tachi when no host is found (#6145) --- src/en/mangalife/build.gradle | 2 +- .../tachiyomi/extension/en/mangalife/MangaLife.kt | 10 ++++++++-- src/en/mangasee/build.gradle | 2 +- .../kanade/tachiyomi/extension/en/mangasee/Mangasee.kt | 10 ++++++++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/en/mangalife/build.gradle b/src/en/mangalife/build.gradle index 9539e01a8..ebdefe694 100644 --- a/src/en/mangalife/build.gradle +++ b/src/en/mangalife/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'MangaLife' pkgNameSuffix = 'en.mangalife' extClass = '.MangaLife' - extVersionCode = 14 + extVersionCode = 15 libVersion = '1.2' } diff --git a/src/en/mangalife/src/eu/kanade/tachiyomi/extension/en/mangalife/MangaLife.kt b/src/en/mangalife/src/eu/kanade/tachiyomi/extension/en/mangalife/MangaLife.kt index 7a7296d50..473f5d027 100644 --- a/src/en/mangalife/src/eu/kanade/tachiyomi/extension/en/mangalife/MangaLife.kt +++ b/src/en/mangalife/src/eu/kanade/tachiyomi/extension/en/mangalife/MangaLife.kt @@ -41,7 +41,7 @@ class MangaLife : HttpSource() { override val supportsLatest = true - private val rateLimitInterceptor = RateLimitInterceptor(1, 2) + private val rateLimitInterceptor = RateLimitInterceptor(1) override val client: OkHttpClient = network.cloudflareClient.newBuilder() .addNetworkInterceptor(rateLimitInterceptor) @@ -264,7 +264,13 @@ class MangaLife : HttpSource() { val pageTotal = curChapter["Page"].string.toInt() - val host = "https://" + script.substringAfter("vm.justgiveupalready = \"").substringBefore("\"") + val host = "https://" + + script + .substringAfter("vm.CurPathName = \"", "") + .substringBefore("\"") + .also { if (it.isEmpty()) + throw Exception("$name is overloaded and blocking Tachiyomi right now. Wait for unblock.") + } val titleURI = script.substringAfter("vm.IndexName = \"").substringBefore("\"") val seasonURI = curChapter["Directory"].string .let { if (it.isEmpty()) "" else "$it/" } diff --git a/src/en/mangasee/build.gradle b/src/en/mangasee/build.gradle index e859e7f65..2cc89ad1e 100644 --- a/src/en/mangasee/build.gradle +++ b/src/en/mangasee/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Mangasee' pkgNameSuffix = 'en.mangasee' extClass = '.Mangasee' - extVersionCode = 18 + extVersionCode = 19 libVersion = '1.2' } diff --git a/src/en/mangasee/src/eu/kanade/tachiyomi/extension/en/mangasee/Mangasee.kt b/src/en/mangasee/src/eu/kanade/tachiyomi/extension/en/mangasee/Mangasee.kt index d2fa5495b..6df13b1fa 100644 --- a/src/en/mangasee/src/eu/kanade/tachiyomi/extension/en/mangasee/Mangasee.kt +++ b/src/en/mangasee/src/eu/kanade/tachiyomi/extension/en/mangasee/Mangasee.kt @@ -44,7 +44,7 @@ class Mangasee : HttpSource() { override val supportsLatest = true - private val rateLimitInterceptor = RateLimitInterceptor(1, 2) + private val rateLimitInterceptor = RateLimitInterceptor(1) override val client: OkHttpClient = network.cloudflareClient.newBuilder() .addNetworkInterceptor(rateLimitInterceptor) @@ -268,7 +268,13 @@ class Mangasee : HttpSource() { val pageTotal = curChapter["Page"].string.toInt() - val host = "https://" + script.substringAfter("vm.justgiveupalready = \"").substringBefore("\"") + val host = "https://" + + script + .substringAfter("vm.CurPathName = \"", "") + .substringBefore("\"") + .also { if (it.isEmpty()) + throw Exception("$name is overloaded and blocking Tachiyomi right now. Wait for unblock.") + } val titleURI = script.substringAfter("vm.IndexName = \"").substringBefore("\"") val seasonURI = curChapter["Directory"].string .let { if (it.isEmpty()) "" else "$it/" }